From 925d41f59672f2e4fad1355e880193f75dcfd952 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Wed, 16 Dec 2015 17:48:33 +0300 Subject: [PATCH] Fix a regression introduced in aa6f7c82. The regular expression changed, and returned the wrong page number to the command completion. --- rc/man.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/man.kak b/rc/man.kak index a0a6a9ff..bec18456 100644 --- a/rc/man.kak +++ b/rc/man.kak @@ -38,7 +38,7 @@ def -params .. \ prefix=${1:0:${kak_pos_in_token}} for page in /usr/share/man/*/${prefix}*.[1-8]*; do candidate=$(basename ${page%%.[1-8]*}) - pagenum=$(echo $page | sed 's/^.*\([1-8][a-z]*\)$/\1/') + pagenum=$(echo $page | sed -r 's,^.+/.+\.([1-8][^.]*)\..+$,\1,') case $candidate in *\*) ;; *) echo $candidate\($pagenum\);;