diff --git a/rc/man.kak b/rc/man.kak index 95b9986a..957772a5 100644 --- a/rc/man.kak +++ b/rc/man.kak @@ -33,7 +33,14 @@ def -hidden -shell-params _man %{ %sh{ fi } } -def -shell-params man %{ %sh{ +def -shell-params \ + -shell-completion %{ + prefix=${1:0:${kak_pos_in_token}} + for page in /usr/share/man/*/${prefix}*.1.gz; do + basename $page .1.gz + done + } \ + man %{ %sh{ [ -z "$@" ] && set -- "$kak_selection" echo "eval -try-client %opt{docsclient} _man $@" } }