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

Re: zsh handling of non-standard if-evaluations



Hi!

--- Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> On Jan 27,  4:59am, Daniel Qarras wrote:
> }
> } if-evaluations that seems to work under bash (default shell on
> those
> } systems) but not under zsh. Do you see worth to mimic bash here?
> The
> } offending case is:
> } 
> } if [ "$VAR" == "VAL" ]
> 
> My guess is:
> 
> schaefer[501] [ "$VAR" == "VAL" ]; echo $?
> zsh: = not found
> schaefer[502] setopt no_equals
> schaefer[503] [ "$VAR" == "VAL" ]; echo $?
> 1

Correct.

> If you're going to run bash scripts through zsh, you need to run them
> with "emulate sh" in effect.

Hmm, my login shell is zsh and I've set in my ~/.zshenv:

. /etc/profile

which in turns goes thru /etc/profile.d/*.sh and one of those scripts
is from the proprietary application. So perhaps I should do "setopt
no_equals" before the above mentioned line?

Thanks.




 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121



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