Open gustavo-hms opened 3 years ago
Yep, Shellcheck reports:
rc/windowing/kitty.kak:18:9: warning: In POSIX sh, 'local' is undefined. [SC2039]
rc/windowing/kitty.kak:36:9: warning: In POSIX sh, 'local' is undefined. [SC2039]
However, local
is supported by dash
, and bash
in POSIX mode. Out of curiosity, what shell are you using?
I'm using fish
. But I think it's not calling fish
when executing these commands... At least, %sh{}
doesn't.
Yes, Kakoune uses /bin/sh
to interpret shell blocks, not your interactive shell. Normally /bin/sh
is bash
, or a descendent of the Almquist Shell like dash
, both of which should support local
. Apparently your OS is unusual.
Of course, using local
in a Kakoune script is still a bug; even though local
is a very common extension to the POSIX standard it's still not a standard feature.
Hmm... this is odd, since I observed this problem in a Ubuntu machine.
Steps
kak
inside Kittynew
Outcome
The command fails and the
*debug*
buffer shows the following message:Expected
It should open a new Kitty window running
kak
.The problem seems to be in this line and this line. If I remove the
local
words, the command works.