fish: use LESS_TERMCAP colors for man pages only
This commit is contained in:
parent
d1968327c3
commit
d2f0f468e2
@ -63,15 +63,6 @@ if status --is-interactive
|
||||
set -g __fish_git_prompt_color_stashstate cyan
|
||||
set -g __fish_git_prompt_color_untrackedfiles cyan
|
||||
set -g __fish_git_prompt_color_upstream yellow
|
||||
|
||||
# Termcap colors for less and manpages
|
||||
set -x LESS_TERMCAP_mb (set_color brmagenta)
|
||||
set -x LESS_TERMCAP_md (set_color brred)
|
||||
set -x LESS_TERMCAP_me (set_color normal)
|
||||
set -x LESS_TERMCAP_se (set_color normal)
|
||||
set -x LESS_TERMCAP_so (set_color -b blue black)
|
||||
set -x LESS_TERMCAP_ue (set_color normal)
|
||||
set -x LESS_TERMCAP_us (set_color brgreen)
|
||||
end
|
||||
|
||||
if not set -q __universals_initialized
|
||||
|
15
fish/functions/man.fish
Normal file
15
fish/functions/man.fish
Normal file
@ -0,0 +1,15 @@
|
||||
function man --wraps man -d "Colorized man pages"
|
||||
# descriptions from `man terminfo`
|
||||
set -lx LESS_TERMCAP_mb (set_color brmagenta) # turn on blinking
|
||||
set -lx LESS_TERMCAP_md (set_color brred) # turn on bold (extra bright)
|
||||
set -lx LESS_TERMCAP_us (set_color brgreen) # turn on underline
|
||||
set -lx LESS_TERMCAP_so (set_color -b blue black) # turn on standout (reverse)
|
||||
set -lx LESS_TERMCAP_me (set_color normal) # turn off all attributes
|
||||
set -lx LESS_TERMCAP_ue (set_color normal) # turn off underline
|
||||
set -lx LESS_TERMCAP_se (set_color normal) # turn off standout (reverse)
|
||||
|
||||
# debug setting to print the capability tags being used
|
||||
#set -lx LESS_TERMCAP_DEBUG on
|
||||
|
||||
command man $argv
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user