+if [[ -x /usr/bin/lesspipe.sh ]] ; then
+ export LESSOPEN="|lesspipe.sh %s"
+elif [[ -x /usr/bin/lesspipe ]] ; then
+ export LESSOPEN="|lesspipe %s"
+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'