diff --git a/fish/config.fish b/fish/config.fish index ddf79fd..bd62ded 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -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 diff --git a/fish/functions/man.fish b/fish/functions/man.fish new file mode 100644 index 0000000..657af2e --- /dev/null +++ b/fish/functions/man.fish @@ -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