--- /dev/null
+# profile-required: TERM.bashrc
+less=$(find_working less 2>/dev/null)
+if [ $? = 0 ]; then
+ export PAGER=less
+ export GIT_PAGER=$PAGER
+ export LESSCHARSET=utf-8
+
+ # Colours.
+ case $(tput colors) in
+ 256)
+ # Blink is green.
+ export LESS_TERMCAP_mb=$'\e[38;5;34m'
+ # Bold is blue.
+ export LESS_TERMCAP_md=$'\e[1m\e[38;5;33m'
+ # Standout is yellow.
+ export LESS_TERMCAP_so=$'\e[1m\e[38;5;226m'
+ # Underline is cyan.
+ export LESS_TERMCAP_us=$'\e[0m\e[38;5;38m'
+ ;;
+
+ 88)
+ export LESS_TERMCAP_mb=$'\e[38;5;24m'
+ export LESS_TERMCAP_md=$'\e[1m\e[38;5;23m'
+ export LESS_TERMCAP_so=$'\e[1m\e[38;5;76m'
+ export LESS_TERMCAP_us=$'\e[0m\e[38;5;26m'
+ ;;
+
+ *)
+ export LESS_TERMCAP_mb=$'\e[32m'
+ export LESS_TERMCAP_md=$'\e[1m\e[36m'
+ export LESS_TERMCAP_so=$'\e[1m\e[33m'
+ export LESS_TERMCAP_us=$'\e[36m'
+ ;;
+ esac
+
+ export LESS_TERMCAP_me=$'\e[0m'
+ export LESS_TERMCAP_se=$'\e[0m'
+ export LESS_TERMCAP_ue=$'\e[0m'
+else
+ alias less=more
+fi
+unset less