Merge remote-tracking branch 'lenormf/rc/man.kak'
This commit is contained in:
commit
01742d8161
|
@ -49,12 +49,10 @@ def -params .. \
|
||||||
} \
|
} \
|
||||||
man -docstring "Manpages viewer wrapper" %{ %sh{
|
man -docstring "Manpages viewer wrapper" %{ %sh{
|
||||||
subject=${@-$kak_selection}
|
subject=${@-$kak_selection}
|
||||||
pagenum=""
|
|
||||||
|
|
||||||
## The completion suggestions display the page number, strip them if present
|
## The completion suggestions display the page number, strip them if present
|
||||||
if expr "$subject" : '[a-zA-Z_-]+\([^\)]+\)'; then
|
pagenum=$(expr "$subject" : '.*(\([1-8].*\))')
|
||||||
pagenum=${subject##*\(}
|
if [ -n "$pagenum" ]; then
|
||||||
pagenum=${pagenum:0:$((${#pagenum} - 1))}
|
|
||||||
subject=${subject%%\(*}
|
subject=${subject%%\(*}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user