Hello,
I’ve been working on OSX for quite a while with oh-my-zsh and its fabulous colored-man plugin. For those who don’t know it, it just adds pretty colors to your man pages. It may seem not significant but it matters a lot to me. I know it’s about less termcaps but I really don’t know how these work and I don’t feel like digging into it so I wonder if anyone has managed to get it working or if someone know an alternative to this.
I’m using Konsole if that matters (and I think it may since it works flawlessly under iTerm 2).
Thanks in advance !
Edit: Here is the plugin if that may help :
if “$OSTYPE[0,7]” = “solaris” ]
then
if ! -x ${HOME}/bin/nroff ]
then
mkdir -p ${HOME}/bin
cat > ${HOME}/bin/nroff <<EOF
#!/bin/sh
if -n “$_NROFF_U” -a “$1,$2,$3” = “-u0,-Tlp,-man” ]; then
shift
exec /usr/bin/nroff -u${_NROFF_U} “$@”
fi
#-- Some other invocation of nroff
exec /usr/bin/nroff “$@”
EOF
chmod +x ${HOME}/bin/nroff
fi
fi
man() {
env
LESS_TERMCAP_mb=$(printf “\e1;31m”)
LESS_TERMCAP_md=$(printf “\e1;31m”)
LESS_TERMCAP_me=$(printf “\e0m”)
LESS_TERMCAP_se=$(printf “\e0m”)
LESS_TERMCAP_so=$(printf “\e1;44;33m”)
LESS_TERMCAP_ue=$(printf “\e0m”)
LESS_TERMCAP_us=$(printf “\e1;32m”)
PAGER=/usr/bin/less
_NROFF_U=1
PATH=${HOME}/bin:${PATH}
man “$@”
}