diff options
Diffstat (limited to '.zsh')
-rw-r--r-- | .zsh/zshrc | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -171,21 +171,26 @@ fi # XTerm Window Title {{{ ################################################# autoload promptnl + +_pre_zshrc () { + echo -ne "${1}${USER}@$(hostname):${PWD/$HOME/~}${2}" + promptnl + vcs_info +} + case $TERM in -xterm*) +xterm*|*rxvt*) precmd() { - echo -ne "\033]0;${USER}@$(hostname):${PWD/$HOME/~}\007"; - promptnl - vcs_info + _pre_zshrc "\033]0;" "\007" } # force xterm 256 - TERM=xterm-256color + [[ $TERM == "xterm*" ]] && TERM=xterm-256color ;; screen*) precmd() { - echo -ne "\033_${USER}@$(hostname):${PWD/$HOME/~}\033\\"; + _pre_zshrc "\033_" "\033\\" promptnl vcs_info } @@ -223,6 +228,11 @@ case $TERM in bindkey "^[OF" end-of-line bindkey "^[[3~" delete-char ;; + *rxvt*) + bindkey "^[[7~" beginning-of-line + bindkey "^[[8~" end-of-line + bindkey "^[[3~" delete-char + ;; screen|linux) bindkey "^[[1~" beginning-of-line bindkey "^[[4~" end-of-line |