Adding some scripts like manpages for fish
This commit is contained in:
parent
37567dbfc3
commit
52542754c8
5 changed files with 264 additions and 0 deletions
27
fish/functions/man.fish
Normal file
27
fish/functions/man.fish
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
function man --description "wrap the 'man' manual page opener to use color in formatting"
|
||||
# based on this group of settings and explanation for them:
|
||||
# http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized
|
||||
# converted to Fish shell syntax thanks to this page:
|
||||
# http://askubuntu.com/questions/522599/how-to-get-color-man-pages-under-fish-shell/650192
|
||||
|
||||
# start of bold:
|
||||
set -x LESS_TERMCAP_md (set_color --bold blue)
|
||||
# end of all formatting:
|
||||
set -x LESS_TERMCAP_me (set_color normal)
|
||||
|
||||
# start of standout (inverted colors):
|
||||
set -x LESS_TERMCAP_so (set_color --bold green)
|
||||
# end of standout (inverted colors):
|
||||
set -x LESS_TERMCAP_se (set_color normal)
|
||||
# (no change – I like the default)
|
||||
|
||||
# start of underline:
|
||||
set -x LESS_TERMCAP_us (set_color --underline)
|
||||
# end of underline:
|
||||
set -x LESS_TERMCAP_ue (set_color normal)
|
||||
# (no change – I like the default)
|
||||
|
||||
command man $argv
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue