Closed timfjord closed 2 years ago
I bet that you are using zsh in iTerm.
The main reason of the failure is that Terminus uses bash to run shell_cmd and bash doesn't expand **
in default (there is a setting globstar to control it).
OTOH, zsh has it enabled in default.
To explain why quotation works, I guess the quoted input is passed to ruby directly without expansion and ruby knows that it was quoted and tries to expand it.
Thanks for the tip @randy3k
Indeed, I am on zsh and, as you mentioned, when I tried that in bash it didn't work.
It can be enabled with the shopt -s globstar
for Bash 4+, but I think I've found a workaround that can be used even for older versions of Bash, basically something like find test -name "*_test.rb" -exec bundle exec ruby -Itest {} +
Closing the issue as it has nothing to do with Terminus
I've been trying to run the following command in Terminus
and it's been always giving me
I can successfully run this command in a native terminal(iTerm 2 in my case). I have a feeling that it is somehow related to the double splat(either the double splat itself or a combination of the
/
and**
, like/**
or**/
) and the way Terminus(or the low-level libraries) interprets that, becausebundle exec ruby -Itest test/*_test.rb
(without the**
) works great. Maybe it quotes the argument, I don't know, because I can achieve the same output in the native terminal if I wrap the argument in the quotes (bundle exec ruby -Itest 'test/**/*_test.rb'
)I couldn't find anything related to that in the Terminus source code so maybe there are some well-know limitations