man.kak: Fix behaviour when called with no params with Posix shells

Seems dash nevers falls back for ${@-$blah}, it does not considers $@
to be empty. Use ${1-$blah} instead as we never have more than one
parameter.
This commit is contained in:
Maxime Coste 2017-12-06 13:23:39 +08:00
parent 936b95ac34
commit 363a0c3a0d

View File

@ -64,7 +64,7 @@ define-command -params ..1 \
If no argument is passed to the command, the selection will be used as page If no argument is passed to the command, the selection will be used as page
The page can be a word, or a word directly followed by a section number between parenthesis, e.g. kak(1)} \ The page can be a word, or a word directly followed by a section number between parenthesis, e.g. kak(1)} \
man %{ %sh{ man %{ %sh{
subject=${@-$kak_selection} subject=${1-$kak_selection}
## The completion suggestions display the page number, strip them if present ## The completion suggestions display the page number, strip them if present
case "${subject}" in case "${subject}" in