Closed embano1 closed 4 years ago
Using demo-magic on my machine (OSX with zsh or bash) won't respect NO_WAIT, i.e. it will always directly run the commands without waiting for pressing return.
zsh
bash
NO_WAIT
return
I think the issue is here:
https://github.com/paxtonhare/demo-magic/blob/fc286d6f7adf86804fd207e26d8b1d10ab35b807/demo-magic.sh#L99
This does not test for a boolean true or false expression but whether the variable is set. Explanation from here:
true
false
So, basically [ $foo ] will be true if $foo is non-empty. Not true or false, just non-empty. [ ! $foo ] is true if $foo is empty or undefined.
My workaround for now is unset NO_WAIT which then works as expected with the current implementation.
unset NO_WAIT
Using demo-magic on my machine (OSX with
zsh
orbash
) won't respectNO_WAIT
, i.e. it will always directly run the commands without waiting for pressingreturn
.I think the issue is here:
https://github.com/paxtonhare/demo-magic/blob/fc286d6f7adf86804fd207e26d8b1d10ab35b807/demo-magic.sh#L99
This does not test for a boolean
true
orfalse
expression but whether the variable is set. Explanation from here:My workaround for now is
unset NO_WAIT
which then works as expected with the current implementation.