From fab8bcc2d42a8202856a8ff1e1b5b21c596c51f8 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Tue, 2 Jun 2009 16:36:20 +0200 Subject: [PATCH] zshrc: Removing mostlike references competely Setting LESS_TERMCAP_* in zshrc now. And since virtually nobody has mostlike installed on their systems, we are now removing all references to it. --- debian/changelog | 4 +++- etc/skel/.zshrc | 7 +------ etc/zsh/zshenv | 10 ---------- etc/zsh/zshrc | 21 +++++++++++---------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5132056..1c0ed15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ grml-etc-core (0.3.73) UNRELEASED; urgency=low * zshrc: Fix a problem when calling compinit can seem to cause zsh startup to hang forever. Reported by Rasmus Steinke. + * zshrc: Fix problems related to TERM=mostlike in zshrc. Again reported by + Rasmus Steinke. - -- Frank Terbeck Sun, 31 May 2009 17:53:28 +0200 + -- Frank Terbeck Tue, 02 Jun 2009 16:36:32 +0200 grml-etc-core (0.3.72) unstable; urgency=low diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 56acc42..0ccf8ef 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -130,9 +130,6 @@ fi ## ignore ~/.ssh/known_hosts entries #alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -o "PreferredAuthentications=keyboard-interactive"' -## a variation of our man2 alias -#alias man2='MANPAGER="sed -e G |less" TERMINFO=~/.terminfo TERM=mostlike /usr/bin/man' - ## global aliases (for those who like them) ## @@ -162,10 +159,8 @@ fi ## Set a search path for the cd builtin #cdpath=(.. ~) -## variations of our manzsh() function; pick you poison: +## variation of our manzsh() function; pick you poison: #manzsh() { /usr/bin/man zshall | most +/"$1" ; } -#[[ -f ~/.terminfo/m/mostlike ]] && MYLESS='LESS=C TERMINFO=~/.terminfo TERM=mostlike less' || MYLESS='less' -#manzsh() { man zshall | $MYLESS -p $1 ; } ## Switching shell safely and efficiently? http://www.zsh.org/mla/workers/2001/msg02410.html #bash() { diff --git a/etc/zsh/zshenv b/etc/zsh/zshenv index 7dbc7bc..97a041c 100644 --- a/etc/zsh/zshenv +++ b/etc/zsh/zshenv @@ -87,16 +87,6 @@ elif [[ -x /usr/bin/lesspipe ]] ; then fi export READNULLCMD=${PAGER:-/usr/bin/pager} -# support termcap colors when using PAGER=less: -# TODO: move these to zshrc, they are only relevant in interactive shells -export LESS_TERMCAP_mb=$'\E[01;31m' -export LESS_TERMCAP_md=$'\E[01;31m' -export LESS_TERMCAP_me=$'\E[0m' -export LESS_TERMCAP_se=$'\E[0m' -export LESS_TERMCAP_so=$'\E[01;44;33m' -export LESS_TERMCAP_ue=$'\E[0m' -export LESS_TERMCAP_us=$'\E[01;32m' - # allow zeroconf for distcc export DISTCC_HOSTS="+zeroconf" diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index a204513..6964210 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -559,6 +559,15 @@ else fi fi +# support colors in less +export LESS_TERMCAP_mb=$'\E[01;31m' +export LESS_TERMCAP_md=$'\E[01;31m' +export LESS_TERMCAP_me=$'\E[0m' +export LESS_TERMCAP_se=$'\E[0m' +export LESS_TERMCAP_so=$'\E[01;44;33m' +export LESS_TERMCAP_ue=$'\E[0m' +export LESS_TERMCAP_us=$'\E[01;32m' + # automatically remove duplicates from these arrays typeset -U path cdpath fpath manpath # }}} @@ -3210,11 +3219,6 @@ check_com -c python && alias http="python -m SimpleHTTPServer" # Use 'g' instead of 'git': check_com g || alias g='git' -# use colors when browsing man pages, but only if not using LESS_TERMCAP_* from /etc/zsh/zshenv: -if [[ -z "$LESS_TERMCAP_md" ]] ; then - [[ -d ~/.terminfo/ ]] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man' -fi - # check whether Debian's package management (dpkg) is running if check_com salias ; then #a2# Check whether a dpkg instance is currently running @@ -3414,11 +3418,8 @@ greph() { history 0 | grep $1 } #a2# Execute \kbd{grep -i -{}-color=auto} alias GREP='grep -i --color=auto' -# one blank line between each line -if [[ -r ~/.terminfo/m/mostlike ]] ; then - #f5# Watch manpages in a stretched style - man2() { PAGER='dash -c "sed G | /usr/bin/less"' TERM=mostlike /usr/bin/man "$@" ; } -fi +#f5# Watch manpages in a stretched style +man2() { PAGER='dash -c "sed G | /usr/bin/less"' command man "$@" ; } # d():Copyright 2005 Nikolai Weibull # note: option AUTO_PUSHD has to be set -- 2.1.4