AutoYADM commit: 2025-05-21 03:33:33
This commit is contained in:
parent
2f7643d380
commit
f9d20cf2c4
5 changed files with 72 additions and 39 deletions
23
.config/fish/functions/kakman.fish
Normal file
23
.config/fish/functions/kakman.fish
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue