Results 1 to 2 of 2

Thread: Can't get colored-man zsh plugin to work

  1. #1

    Default Can't get colored-man zsh plugin to work

    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" ]
    if [ ! -x ${HOME}/bin/nroff ]
    mkdir -p ${HOME}/bin
    cat > ${HOME}/bin/nroff <<EOF
    if [ -n "\$_NROFF_U" -a "\$1,\$2,\$3" = "-u0,-Tlp,-man" ]; then
    exec /usr/bin/nroff -u\${_NROFF_U} "\$@"
    #-- Some other invocation of nroff
    exec /usr/bin/nroff "\$@"
    chmod +x ${HOME}/bin/nroff

    man() {
    env \
    LESS_TERMCAP_mb=$(printf "\e[1;31m") \
    LESS_TERMCAP_md=$(printf "\e[1;31m") \
    LESS_TERMCAP_me=$(printf "\e[0m") \
    LESS_TERMCAP_se=$(printf "\e[0m") \
    LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
    LESS_TERMCAP_ue=$(printf "\e[0m") \
    LESS_TERMCAP_us=$(printf "\e[1;32m") \
    PAGER=/usr/bin/less \
    _NROFF_U=1 \
    PATH=${HOME}/bin:${PATH} \
    man "$@"

  2. #2

    Default Re: Can't get colored-man zsh plugin to work

    Ok I found the solution on a gentoo forum ;

    The solution was actually to export GROFF_NO_SGR=1. I'm still looking forward to understanding what it does, if anyone's interested in just let me know there or via direct message

    Have a nice day dear Suse users

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts