[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 fai

From: Peter Stephenson
Subject: Re: Zsh 3 and ${1+"$@"} (Was: [GNU Autoconf 2.53] testsuite.log: 126 failures)
Date: Tue, 09 Apr 2002 12:05:30 +0100

Akim Demaille wrote:
> | I think the problem you are running across is that with the option
> | SH_WORD_SPLIT set (as it is for sh compatibility), you get this behaviour:
> | 
> | % set 'one two'
> | % for arg in ${1+"$@"}; do echo $arg; done
> | one
> | two
> | 
> | whereas you expect `one two' on the same line.  
> `you' == akim, or == the sh standard?

Both, presumably, although I haven't explicitly followed through the
standard.  (It's kind of irrelevant, since you (akim) are explicitly
trying to work around eccentricities.)

> | This problem is still in
> | zsh 4 --- inside another substitution, either it's splitting all words
> | on spaces, or it's splitting none.
> I'm sure I understand you here, given that Zsh 4 exhibiting the
> behavior I (Akim :) was expecting.

Not for me...

% zsh -f
% setopt shwordsplit
% set 'one word' 'two words'
% for arg in ${1+"$@"}; do echo $arg; done
% print $ZSH_VERSION

Same in 4.0.  Possibly you tried it without shwordsplit --- remember
it's only set by default if you invoke zsh in sh-compatibility mode.

> Finally, one question: do you know if Apple plans to continue with Zsh
> 3?  Why did they stick to it?

There's a story they're going to switch to bash, but it's difficult to
get information --- we've only ever heard second hand from someone who
knows someone etc. etc...

Peter Stephenson <address@hidden>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]