Fix :man completion on unknown man pages

This commit is contained in:
Maxime Coste 2015-07-20 13:16:05 +01:00
parent 79562a614e
commit d8fe238c11

View File

@ -37,7 +37,11 @@ def -shell-params \
-shell-completion %{ -shell-completion %{
prefix=${1:0:${kak_pos_in_token}} prefix=${1:0:${kak_pos_in_token}}
for page in /usr/share/man/*/${prefix}*.1.gz; do for page in /usr/share/man/*/${prefix}*.1.gz; do
basename $page .1.gz candidate=$(basename $page .1.gz)
case $candidate in
*\*) ;;
*) echo $candidate ;;
esac
done done
} \ } \
man %{ %sh{ man %{ %sh{