From 664f382ab2c102d06666d9c1ce509c3ab5f75aef Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Wed, 16 Mar 2016 14:08:52 +0200 Subject: [PATCH] Convert a non-POSIX extended sed regex to a basic notation --- rc/core/man.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/core/man.kak b/rc/core/man.kak index d3545003..6529646b 100644 --- a/rc/core/man.kak +++ b/rc/core/man.kak @@ -40,10 +40,10 @@ def -params .. \ prefix=$(printf %s "$1" | cut -c1-${kak_pos_in_token} 2>/dev/null) for page in /usr/share/man/*/${prefix}*.[1-8]*; do candidate=$(basename ${page%%.[1-8]*}) - pagenum=$(printf %s "$page" | sed -r 's,^.+/.+\.([1-8][^.]*)\..+$,\1,') + pagenum=$(printf %s "$page" | sed 's,^.*\.\([1-8].*\)\..*$,\1,') case $candidate in *\*) ;; - *) printf %s $candidate\($pagenum\);; + *) printf %s\\n $candidate\($pagenum\);; esac done } \