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

@ -0,0 +1,23 @@
function kakman --wraps man --description 'Display manual pages with Kakoune'
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 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
$mancmd
return
end
$mancmd
end