Add enabling of colored output for less
This commit is contained in:
parent
01480f6a3e
commit
c4cc74b668
1 changed files with 11 additions and 2 deletions
|
@ -37,13 +37,13 @@ fi
|
||||||
|
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm-color|*-256color) color_prompt=yes;;
|
xterm-color|*-256color|xterm-kitty) color_prompt=yes;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
# off by default to not distract the user: the focus in a terminal window
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
# should be on the output of commands, not on the prompt
|
# should be on the output of commands, not on the prompt
|
||||||
force_color_prompt=yes
|
#force_color_prompt=yes
|
||||||
|
|
||||||
if [ -n "$force_color_prompt" ]; then
|
if [ -n "$force_color_prompt" ]; then
|
||||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
@ -116,6 +116,15 @@ if ! shopt -oq posix; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable colored less output
|
||||||
|
export LESS_TERMCAP_mb=$'\e[1;32m'
|
||||||
|
export LESS_TERMCAP_md=$'\e[1;32m'
|
||||||
|
export LESS_TERMCAP_me=$'\e[0m'
|
||||||
|
export LESS_TERMCAP_se=$'\e[0m'
|
||||||
|
export LESS_TERMCAP_so=$'\e[01;33m'
|
||||||
|
export LESS_TERMCAP_ue=$'\e[0m'
|
||||||
|
export LESS_TERMCAP_us=$'\e[1;4;31m'
|
||||||
|
|
||||||
|
|
||||||
# Enable bash-git-prompt
|
# Enable bash-git-prompt
|
||||||
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue