diff --git a/zsh.changes b/zsh.changes index 731ae5b..7dc7a92 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 22 12:45:53 UTC 2015 - hvogel@opensuse.org + +- Nowadays more and more terminals set $TERM to xterm-256color + ------------------------------------------------------------------- Tue Feb 10 08:27:53 UTC 2015 - dimstar@opensuse.org diff --git a/zshrc b/zshrc index b8fdfb7..e2f375f 100644 --- a/zshrc +++ b/zshrc @@ -91,7 +91,7 @@ zle -N history-beginning-search-forward-end history-search-end bindkey "^[[5~" history-beginning-search-backward-end bindkey "^[[6~" history-beginning-search-forward-end -if [[ "$TERM" == "xterm" ]] then +if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then bindkey "^[2;5~" yank bindkey "^[3;5~" delete-char bindkey "^[5;5~" up-history @@ -113,7 +113,7 @@ bindkey "^?" backward-delete-char bindkey "^H" backward-delete-char # Home and End -if [[ "$TERM" == "xterm" ]] then +if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then # Normal keypad and cursor of xterm bindkey "^[[1~" history-search-backward bindkey "^[[4~" set-mark-command @@ -138,7 +138,7 @@ fi fi # Application keypad and cursor of xterm -if [[ "$TERM" == "xterm" ]] then +if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then bindkey "^[OD" backward-char bindkey "^[OC" forward-char bindkey "^[OA" up-history @@ -196,13 +196,13 @@ bindkey "^[[31~" undefined-key bindkey "^[[32~" undefined-key bindkey "^[[33~" undefined-key bindkey "^[[34~" undefined-key -if [[ "$TERM" == "xterm" ]] then +if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then # Not common bindkey "^[[35~" undefined-key bindkey "^[[36~" undefined-key fi -if [[ "$TERM" == "xterm" ]] then +if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then # Application keypad and cursor of xterm # with NumLock ON # @@ -230,7 +230,7 @@ fi # EMACS line editing if [[ "$ZSHEDIT" == "emacs" ]] then # ... xterm application cursor - if [[ "$TERM" == "xterm" ]] then + if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" ]] then bindkey "^[^[OD" backward-word bindkey "^[^[OC" forward-word bindkey "^[^[OA" up-history