Support LESS_TERMCAP_* 0.3.17
authorMichael Prokop <mika@grml.org>
Mon, 23 Jul 2007 09:41:09 +0000 (11:41 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 23 Jul 2007 09:41:09 +0000 (11:41 +0200)
debian/changelog
etc/skel/.zshrc
etc/zsh/zshenv
etc/zsh/zshrc

index 5aad68f..e4472f8 100644 (file)
@@ -4,6 +4,7 @@ grml-etc-core (0.3.17) unstable; urgency=low
   * /etc/skel/.zshrc:
     - added function weather() to retrieve weather information on
       the console
+    - use mostlike manpage browser only if LESS_TERMCAP_* is not set
   * /etc/zsh/zshrc:
     - added alias S for screen
     - alias s for ssh
@@ -12,6 +13,7 @@ grml-etc-core (0.3.17) unstable; urgency=low
       (thanks for reporting the issue, Kevin Krammer!)
   * /etc/zsh/zshenv:
     - check for presence of lesspipe[.sh] before setting $LESSOPEN
+    - added LESS_TERMCAP_*
   * /etc/skel/.vimrc:
     - deactivate digraph option causing too many headaches for people
       not being used to that option
index 187e254..9c7fb60 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Don Mai 31 17:19:00 CEST 2007 [mika]
+# Latest change: Mon Jul 23 11:40:12 CEST 2007 [mika]
 ################################################################################
 
 # source ~/.zshrc.global {{{
   alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
   alias insecscp='scp -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"'
 
-# use colors when browsing man pages (if not using pinfo or PAGER=most)
-  [ -d ~/.terminfo/ ] && alias man='TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man'
+# 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 type salias &>/dev/null ; then
index a067915..93988c0 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Die Jul 17 23:23:26 CEST 2007 [mika]
+# Latest change: Mon Jul 23 11:37:26 CEST 2007 [mika]
 ################################################################################
 # This file is sourced on all invocations of the shell.
 # It is the 1st file zsh reads; it's read for every shell,
   fi
   export READNULLCMD=${PAGER:-/usr/bin/pager}
 
+# support termcap colors when using PAGER=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'
+
 # allow zeroconf for distcc
   export DISTCC_HOSTS="+zeroconf"
 
index a31cb8a..0d85b3e 100644 (file)
   export MAIL=${MAIL:-/var/mail/$USER}
   # if we don't set $SHELL then aterm, rxvt,.. will use /bin/sh or /bin/bash :-/
   export SHELL='/bin/zsh'
-  [[ -f ~/.terminfo/m/mostlike ]] && MYLESS='LESS=C TERMINFO=~/.terminfo TERM=mostlike less' || MYLESS='less'
   [ -x $(which dircolors) ] && eval `dircolors -b`
 
 # Search path for the cd command
@@ -1255,6 +1254,7 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"."
   else
      manzsh()  { /usr/bin/man zshall |  vim -c "se ft=man| se hlsearch" +/"$1" - ; }
      # 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 ; }
   fi