From d72a7d09a53c3c10615337a1306efb050e88eba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Thu, 24 Mar 2011 03:52:51 +0100 Subject: ZSH enhancements. --- .zsh/zshrc | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to '.zsh/zshrc') diff --git a/.zsh/zshrc b/.zsh/zshrc index 898e638..9f36e7d 100644 --- a/.zsh/zshrc +++ b/.zsh/zshrc @@ -100,9 +100,13 @@ zstyle ":completion:*:default" select-prompt "%SMatch %M %P%s" # show statusl zstyle ":completion::complete:*" rehash true # rehash always :) +# colors [[ -z $LS_COLORS ]] && eval $(dircolors) # needed for next line zstyle ":completion:*:default" list-colors ${(s.:.)LS_COLORS} # make filecompletions being colored +# do not show the current directory for e.g. cd ../ +zstyle ':completion:*:cd:*' ignore-parents parent pwd + # }}} # Prompt {{{ @@ -195,6 +199,14 @@ bindkey "^[-" copy-prev-word # delete previous word upto next whitespace bindkey "^ew" backward-kill-word + +# some 'insert x before' things +for word c in sudo s vim v AK a; do + eval "insert-$word() { LBUFFER=\"$word \$LBUFFER\" }" + zle -N insert-$word + bindkey "^[i$c" insert-$word +done + case $TERM in xterm*|aterm|rxvt) bindkey "^[OH" beginning-of-line @@ -214,8 +226,9 @@ esac HISTSIZE=10000 SAVEHIST=12000 HISTFILE=~/.zshhistory -setopt hist_no_store # no not store history related commands +setopt hist_no_store # do not store history related commands setopt inc_append_history # append incrementally instead of waiting until the shell exists +setopt share_history # share the history between sessions setopt hist_verify # for history related commands: reload the expanded version instead of executing it directly setopt hist_no_functions # do not store function definitions @@ -235,4 +248,12 @@ setopt auto_continue # disown implies 'bg' # }}} +# Rest {{{ +################################################# + +# load zmv +autoload -U zmv + +# }}} + # vim: fdm=marker -- cgit v1.2.3