From 363a0c3a0d95c2eafddda1d027a62835e851ff61 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 6 Dec 2017 13:23:39 +0800 Subject: [PATCH] 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. --- rc/core/man.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/core/man.kak b/rc/core/man.kak index 77dd57fc..27cdf7f6 100644 --- a/rc/core/man.kak +++ b/rc/core/man.kak @@ -64,7 +64,7 @@ define-command -params ..1 \ 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)} \ man %{ %sh{ - subject=${@-$kak_selection} + subject=${1-$kak_selection} ## The completion suggestions display the page number, strip them if present case "${subject}" in