|
|
|
@ -56,16 +56,6 @@ __export_pager() |
|
|
|
# Export existing pager |
|
|
|
if [ -n "${___pager}" ]; then |
|
|
|
export PAGER="${___pager}" |
|
|
|
|
|
|
|
export LESS='-r' |
|
|
|
# Add colours for less |
|
|
|
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 |
|
|
|
} |
|
|
|
|
|
|
|
@ -126,6 +116,30 @@ __export_ls_colors() |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
__export_lesspipe_opts() { |
|
|
|
|
|
|
|
# Enable lesspipe colouring if set as default pager |
|
|
|
if [[ ${PAGER} =~ .*/less$ ]]; then |
|
|
|
|
|
|
|
# Requires source-highlight package to be installed |
|
|
|
if [[ -x /usr/bin/src-hilite-lesspipe.sh ]]; then |
|
|
|
export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" |
|
|
|
export LESS=' -R ' |
|
|
|
else |
|
|
|
export LESS='-r' |
|
|
|
fi |
|
|
|
|
|
|
|
# Add colours for less |
|
|
|
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 |
|
|
|
} |
|
|
|
|
|
|
|
# --- SSH agent --- # |
|
|
|
agent() |
|
|
|
{ |
|
|
|
@ -295,6 +309,8 @@ __export_ls_colors |
|
|
|
# shellcheck disable=SC2119 |
|
|
|
__export_pager |
|
|
|
# shellcheck disable=SC2119 |
|
|
|
__export_lesspipe_opts |
|
|
|
# shellcheck disable=SC2119 |
|
|
|
__export_editor |
|
|
|
# shellcheck disable=SC2119 |
|
|
|
__export_browser |
|
|
|
|