Fix some posix compliance in man.kak

This commit is contained in:
Maxime Coste 2015-12-10 20:40:43 +00:00
parent 2ca1784495
commit aa6f7c82e9

View File

@ -38,7 +38,7 @@ def -params .. \
prefix=${1:0:${kak_pos_in_token}} prefix=${1:0:${kak_pos_in_token}}
for page in /usr/share/man/*/${prefix}*.[1-8]*; do for page in /usr/share/man/*/${prefix}*.[1-8]*; do
candidate=$(basename ${page%%.[1-8]*}) candidate=$(basename ${page%%.[1-8]*})
pagenum=$(sed -r 's,^.+/.+\.([1-8][^.]*)\..+$,\1,' <<< $page) pagenum=$(echo $page | sed 's/^.*\([1-8][a-z]*\)$/\1/')
case $candidate in case $candidate in
*\*) ;; *\*) ;;
*) echo $candidate\($pagenum\);; *) echo $candidate\($pagenum\);;