summaryrefslogtreecommitdiff
path: root/.zsh
diff options
context:
space:
mode:
Diffstat (limited to '.zsh')
-rw-r--r--.zsh/zshrc22
1 files changed, 16 insertions, 6 deletions
diff --git a/.zsh/zshrc b/.zsh/zshrc
index f8f9967..5a59e27 100644
--- a/.zsh/zshrc
+++ b/.zsh/zshrc
@@ -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