Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

`=' expansion causes script/subshell to exit, bug?



Hello. Recently I've seen that line like

[[ -x =somebinary ]] || cmd

causes script to exit unexpectedly with message like «/path/to/script:$line: =somebinary not found»,
instead of invoking || cmd and continue executing

some simple tests:

% ( [[ -x =123123 ]] || { print 'ohshi'; exit 2 } )
zsh: 123123 not found <exit code 1>

% ( b=123123; print =$b; print 'ohshi' )                                                  ↑
zsh: 123123 not found

Is it intended behaviour?

% zsh --version
zsh 5.6.2 (x86_64-pc-linux-gnu)

-- 
Regards,
  Vasiliy Ivanov <beelzebubbie.logs@xxxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author