2018-12-24 21:39:01 -05:00
|
|
|
export LESS_TERMCAP_mb=$'\e[1;31m' # enter blinking mode
|
2018-12-25 13:15:20 -05:00
|
|
|
#export LESS_TERMCAP_md=$'\e[1;34;74m' # double-bright mode
|
|
|
|
export LESS_TERMCAP_md=$'\e[38;5;106m' # double-bright mode
|
2018-12-24 21:39:01 -05:00
|
|
|
export LESS_TERMCAP_me=$'\e[0m' # turn off all appearance mode
|
|
|
|
|
|
|
|
#export LESS_TERMCAP_so=$'\e[30;42m' # enter standout mode
|
2018-12-25 13:15:20 -05:00
|
|
|
export LESS_TERMCAP_so=$'\e[38;5;23;48;5;106m' # begin standout-mode - info box
|
2018-12-24 21:39:01 -05:00
|
|
|
export LESS_TERMCAP_se=$'\e[0m' # end standout mode
|
|
|
|
|
|
|
|
export LESS_TERMCAP_us=$'\e[4;32;146m' # begin underline
|
|
|
|
export LESS_TERMCAP_ue=$'\e[0m' # end underline
|
|
|
|
|
2018-12-25 13:15:20 -05:00
|
|
|
#export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
|
|
|
|
#export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
|
|
|
|
|
|
|
|
#export LESS_TERMCAP_mr=$(tput rev)
|
|
|
|
#export LESS_TERMCAP_mh=$(tput dim)
|
2019-01-05 16:25:43 -05:00
|
|
|
|
2019-01-05 22:52:16 -05:00
|
|
|
export LESS="-R -x2 -I"
|
2019-01-05 17:46:54 -05:00
|
|
|
export LESSOPEN="|~/bin/lessfilter %s"
|
2019-01-05 17:42:13 -05:00
|
|
|
export PYGMENTIZE_STYLE='lovelace'
|
2019-01-05 16:25:43 -05:00
|
|
|
|
2019-01-05 22:52:16 -05:00
|
|
|
#if [[ -f "/usr/share/nvim/runtime/macros/less.sh" ]]; then
|
|
|
|
# alias less="/usr/share/nvim/runtime/macros/less.sh"
|
|
|
|
#elif [[ -f "/usr/share/vim/vim80/macros/less.sh" ]]; then
|
|
|
|
# alias less="/usr/share/vim/vim80/macros/less.sh"
|
|
|
|
#elif [[ -f "/usr/share/vim/vim74/macros/less.sh" ]]; then
|
|
|
|
# alias less="/usr/share/vim/vim74/macros/less.sh"
|
|
|
|
#fi
|
|
|
|
|
|
|
|
function less() {
|
|
|
|
if [ -t 1 ]; then
|
|
|
|
if test $# = 0; then
|
|
|
|
if test -t 0; then
|
|
|
|
echo "Missing filename" 1>&2
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
/usr/bin/less -
|
|
|
|
else
|
|
|
|
if [[ -f "/usr/share/nvim/runtime/macros/less.sh" ]]; then
|
|
|
|
/usr/share/nvim/runtime/macros/less.sh "$@"
|
|
|
|
elif [[ -f "/usr/share/vim/vim80/macros/less.sh" ]]; then
|
|
|
|
/usr/share/vim/vim80/macros/less.sh "$@"
|
|
|
|
elif [[ -f "/usr/share/vim/vim74/macros/less.sh" ]]; then
|
|
|
|
/usr/share/vim/vim74/macros/less.sh "$@"
|
|
|
|
else
|
|
|
|
/usr/bin/less "$@"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if test $# = 0; then
|
|
|
|
if test -t 0; then
|
|
|
|
echo "Missing filename" 1>&2
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
cat
|
|
|
|
else
|
|
|
|
cat "$@"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|