Commit b9a8ee7f authored by axxx007xxxz's avatar axxx007xxxz

bashrc: Colorize 'man' output

Make the 'man' command output looking better, thanks lffl.org for the code.
Before: http://i.imgur.com/hWjpVcq.png - After: http://i.imgur.com/LY4IxNS.png.
parent d389c7d1
......@@ -63,6 +63,22 @@ if [ "$color_prompt" = yes ]; then
else
PS1='┌──[\u@\h]─[\w]\n└──╼ \$ '
fi
# Set 'man' colors
if [ "$color_prompt" = yes ]; then
man() {
env \
LESS_TERMCAP_mb=$'\e[01;31m' \
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
man "$@"
}
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
......
......@@ -63,6 +63,22 @@ if [ "$color_prompt" = yes ]; then
else
PS1='┌──[\u@\h]─[\w]\n└──╼ \$ '
fi
# Set 'man' colors
if [ "$color_prompt" = yes ]; then
man() {
env \
LESS_TERMCAP_mb=$'\e[01;31m' \
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
man "$@"
}
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment