From 5478ef70c0c343b4b120830c4c7e07e345bd85e3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 7 Jun 2007 14:54:46 +0200 Subject: [PATCH] applied patch from Issue230 --- debian/changelog | 2 +- etc/zsh/zshrc | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8f29c65..bad8edc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ grml-etc-core (0.3.10) unstable; urgency=low * /etc/zsh/zshrc: use \e instead of the escape-sequence. - Thanks ft! + Thanks for the patches, ft! [Closes: issue229, issue230] -- Michael Prokop Thu, 07 Jun 2007 14:51:38 +0200 diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1c4fd3c..91b39d7 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -183,14 +183,14 @@ [[ -z "$terminfo[kcuf1]" ]] || bindkey -M viins "$terminfo[kcuf1]" vi-forward-char [[ -z "$terminfo[kcub1]" ]] || bindkey -M viins "$terminfo[kcub1]" vi-backward-char # ncurses stuff: - [[ "$terminfo[kcuu1]" == "O"* ]] && bindkey -M viins "${terminfo[kcuu1]/O/[}" vi-up-line-or-history - [[ "$terminfo[kcud1]" == "O"* ]] && bindkey -M viins "${terminfo[kcud1]/O/[}" vi-down-line-or-history - [[ "$terminfo[kcuf1]" == "O"* ]] && bindkey -M viins "${terminfo[kcuf1]/O/[}" vi-forward-char - [[ "$terminfo[kcub1]" == "O"* ]] && bindkey -M viins "${terminfo[kcub1]/O/[}" vi-backward-char - [[ "$terminfo[khome]" == "O"* ]] && bindkey -M viins "${terminfo[khome]/O/[}" beginning-of-line - [[ "$terminfo[kend]" == "O"* ]] && bindkey -M viins "${terminfo[kend]/O/[}" end-of-line - [[ "$terminfo[khome]" == "O"* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line - [[ "$terminfo[kend]" == "O"* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line + [[ "$terminfo[kcuu1]" == $'\eO'* ]] && bindkey -M viins "${terminfo[kcuu1]/O/[}" vi-up-line-or-history + [[ "$terminfo[kcud1]" == $'\eO'* ]] && bindkey -M viins "${terminfo[kcud1]/O/[}" vi-down-line-or-history + [[ "$terminfo[kcuf1]" == $'\eO'* ]] && bindkey -M viins "${terminfo[kcuf1]/O/[}" vi-forward-char + [[ "$terminfo[kcub1]" == $'\eO'* ]] && bindkey -M viins "${terminfo[kcub1]/O/[}" vi-backward-char + [[ "$terminfo[khome]" == $'\eO'* ]] && bindkey -M viins "${terminfo[khome]/O/[}" beginning-of-line + [[ "$terminfo[kend]" == $'\eO'* ]] && bindkey -M viins "${terminfo[kend]/O/[}" end-of-line + [[ "$terminfo[khome]" == $'\eO'* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line + [[ "$terminfo[kend]" == $'\eO'* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line fi ## keybindings (run 'bindkeys' for details, more details via man zshzle) @@ -576,12 +576,12 @@ fi WHITE="%{${fg[white]}%}" NO_COLOUR="%{${reset_color}%}" else - BLUE="%{%}" - RED="%{%}" - GREEN="%{%}" - CYAN="%{%}" - WHITE="%{%}" - NO_COLOUR="%{%}" + BLUE=$'%{\e[1;34m%}' + RED=$'%{\e[1;31m%}' + GREEN=$'%{\e[1;32m%}' + CYAN=$'%{\e[1;36m%}' + WHITE=$'%{\e[1;37m%}' + NO_COLOUR=$'%{\e[0m%}' fi EXITCODE="%(?..%?%1v )" @@ -665,8 +665,8 @@ ${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# " alias md='mkdir' # see http://www.cl.cam.ac.uk/~mgk25/unicode.html#term for details - alias term2iso="echo 'Setting terminal to iso mode' ; echo -e '%@'" - alias term2utf="echo 'Setting terminal to utf-8 mode'; echo -e '%G'" + alias term2iso="echo 'Setting terminal to iso mode' ; print -n '\e%@'" + alias term2utf="echo 'Setting terminal to utf-8 mode'; print -n '\e%G'" alias utf2iso='if isutfenv ; then for ENV in `env | grep UTF` ; do -- 2.1.4