1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-24 07:53:41 +03:00

Convert a non-POSIX extended sed regex to a basic notation

This commit is contained in:
Frank LENORMAND 2016-03-16 14:08:52 +02:00
parent bdb67d8227
commit 664f382ab2

View File

@ -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
} \