From f274aba74673e64a477a693aa9f53025fc1e165e Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 11 Sep 2015 12:55:55 +0100 Subject: [PATCH] Fix man page completion, support more man page extensions --- rc/man.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/man.kak b/rc/man.kak index 22f3ac6b..03c80070 100644 --- a/rc/man.kak +++ b/rc/man.kak @@ -36,8 +36,8 @@ def -hidden -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 - candidate=$(basename $page .1.gz) + for page in /usr/share/man/*/${prefix}*.[1-8]*; do + candidate=$(basename ${page%%.[1-8]*}) case $candidate in *\*) ;; *) echo $candidate ;;