AutoYADM commit: 2025-05-21 03:33:33

This commit is contained in:
Daniel Fichtinger 2025-05-21 03:33:33 -04:00
parent 2f7643d380
commit f9d20cf2c4
5 changed files with 72 additions and 39 deletions

View file

@ -1,39 +1,3 @@
function man --wraps man --description 'Format and display manual pages'
set -l end (printf "\e[0m")
set -lx LESS_TERMCAP_mb (set_color -o red)
set -lx LESS_TERMCAP_md (set_color -o B14242)
set -lx LESS_TERMCAP_me $end
set -lx LESS_TERMCAP_so (set_color 4A8B8B)
set -lx LESS_TERMCAP_se $end
set -lx LESS_TERMCAP_us (set_color -o D87C4A)
set -lx LESS_TERMCAP_ue $end
set -lx LESS '-R -s'
set -lx GROFF_NO_SGR yes # fedora
set -lx MANPATH (string join : $MANPATH)
if test -z "$MANPATH"
type -q manpath
and set MANPATH (command manpath)
end
# Check data dir for Fish 2.x compatibility
set -l fish_data_dir
if set -q __fish_data_dir
set fish_data_dir $__fish_data_dir
else
set fish_data_dir $__fish_datadir
end
set -l kakargs 'set buffer filetype man; set buffer readonly true; execute-keys %sh{ }'
set -l mancmd kak -e "man '$argv'"
set -l fish_manpath (dirname $fish_data_dir)/fish/man
if test -d "$fish_manpath" -a -n "$MANPATH"
set MANPATH "$fish_manpath":$MANPATH
# command man $argv | kak -e "$kakargs"
$mancmd
return
end
# command man $argv | kak -e "$kakargs"
$mancmd
kakman $argv
end