Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Fwd: [[ -x =command ]]



On 16/10/2007, Atom Smasher <atom@xxxxxxxxxxx> wrote:


> i've got this in my ~/.zshrc:
>         [[ -x =most ]] && export PAGER=most

Somewhat unrelated, but I assume you are using most for its colour
capabilities and putting up with its shortcomings to have them.

I suggest

if [[ -x `which less` ]]
then
    export PAGER="less"
    if [ $terminfo[colors] -ge 8 ]
    then
        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'
    fi
else
    export PAGER="more"
fi

or whichever modification suits your needs.


Richard


PS: I hate GMail and its pityful list handling and full lack of any
scriptability



Messages sorted by: Reverse Date, Date, Thread, Author