diff options
-rw-r--r-- | shellrc.d/less | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/shellrc.d/less b/shellrc.d/less index d2490a5..b9d4c90 100644 --- a/shellrc.d/less +++ b/shellrc.d/less @@ -1,10 +1,19 @@ # vim: ft=sh: export LESS=-R -export LESS_TERMCAP_mb=$'\E[1;31m' -export LESS_TERMCAP_md=$'\E[1;36m' -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[1;32m' -[ -x /usr/bin/src-hilite-lesspipe.sh ] && export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" +export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) +export LESS_TERMCAP_md=$(tput bold; tput setaf 6) +export LESS_TERMCAP_me=$(tput sgr0) +export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) +export LESS_TERMCAP_se=$(tput rmso; tput sgr0) +export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) +export LESS_TERMCAP_ue=$(tput rmul; tput sgr0) +export LESS_TERMCAP_mr=$(tput rev) +export LESS_TERMCAP_mh=$(tput dim) +export LESS_TERMCAP_ZN=$(tput ssubm) +export LESS_TERMCAP_ZV=$(tput rsubm) +export LESS_TERMCAP_ZO=$(tput ssupm) +export LESS_TERMCAP_ZW=$(tput rsupm) +export GROFF_NO_SGR=1 # For Konsole and Gnome-terminal +if command -v src-hilite-lesspipe.sh >/dev/null; then + export LESSOPEN="| $(command -v src-hilite-lesspipe.sh) %s" +fi |