#------------------------------------------------------------------#-- # my zsh-config ... coz zsh rox hell #------------------------------------------------------------------#-- : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(: $PWD\a";; screen) [ -n $DISPLAY ] && echo -en "\e]2;<$USER@$HOST>: $PWD\a" ;; esac } case "$TERM" in *xterm*|*rxvt*) echo -en "\e]2;<$USER@$HOST>: $PWD\a";; screen) [ -n $DISPLAY ] && echo -en "\e]2;<$USER@$HOST>: $PWD\a";; esac #--------------------------------------------------------#-- # keymapping #--------------------------------------------------------#-- # press ctrl-v to get special keys (like 'home') zle -N select-word-style select-word-style bash bindkey -e #bindkey '\e^h' delete-backward-word # alt - backspace bindkey ' ' magic-space # history completion with space too bindkey '[D' emacs-backward-word # alt-cursor-left bindkey '[C' emacs-forward-word # alt-cursor-right bindkey '' vi-match-bracket # ctrl 5 bindkey '^[[8~' end-of-line # home bindkey '^[[7~' beginning-of-line # end bindkey '^k' kill-line # c-_ is undo #---------------------------------------------------- # keychain => http://www.gentoo.org/projects/keychain #---------------------------------------------------- if [ `whoami` != 'root' ] then if [ -f ~/.ssh/id_dsa -a -f ~/.ssh/id_dsa ]; then if which keychain &> /dev/null then keychain -q id_dsa id_rsa . ~/.keychain/${HOST}-sh fi fi fi # csh/tcsh style setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } #----------------- # host-specifics #----------------- rcs=( ~/.zshrc.aliases ~/.zshrc.funcs ~/.zshrc.local ) for rc in $rcs ; do [ -f $rc ] && source $rc done true # now show the info display_info # vim:nowrap