Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh handling of non-standard if-evaluations
- X-seq: zsh-users 11149
- From: Daniel Qarras <dqarras@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: zsh handling of non-standard if-evaluations
- Date: Sun, 28 Jan 2007 11:00:17 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=S4/sTcQZG1ZxBRjH0IgvTgHE0d0cPmVBlmELeUKvWvbT4V8RTctRalegxBIXywjpkzmVxivwXEn87xQcTBaasMlKZc6Z2cePXSE1UkU66LhGt6+mcie9j92HLQzPshXI7QMgiJR9GVAsxUyn2hCTpiHOhh7r5n6kQCzVbl8DChc=;
- In-reply-to: <070128095938.ZM380@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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