Created
June 27, 2020 06:16
-
-
Save leolovenet/b28b257feb0d053ea1904fb3439896af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add this function to your $HOME/.config/fish/config.fish | |
function man | |
set -x LESS_TERMCAP_mb (printf "\e[01;32m") | |
set -x LESS_TERMCAP_md (printf "\e[01;32m") | |
set -x LESS_TERMCAP_me (printf "\e[0m") | |
set -x LESS_TERMCAP_se (printf "\e[0m") | |
set -x LESS_TERMCAP_so (printf "\e[01;33m") | |
set -x LESS_TERMCAP_ue (printf "\e[0m") | |
set -x LESS_TERMCAP_us (printf "\e[1;4;31m") | |
# copy from (dir $__fish_data_dir)/fish/functions/man.fish | |
set -l manpath | |
if set -q MANPATH | |
set manpath $MANPATH | |
else if set -l p (command man -p 2>/dev/null) | |
set manpath (string replace -r '[^/]+$' '' $p) | |
else | |
set manpath '' | |
end | |
set -lx MANPATH $manpath | |
set -l fish_manpath (dirname $__fish_data_dir)/fish/man | |
if test -d $fish_manpath | |
set MANPATH $fish_manpath $MANPATH | |
end | |
command man $argv | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment