From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15807 invoked from network); 12 Apr 1999 07:17:45 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Apr 1999 07:17:45 -0000 Received: (qmail 1935 invoked by alias); 12 Apr 1999 07:17:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6005 Received: (qmail 1928 invoked from network); 12 Apr 1999 07:17:35 -0000 Date: Mon, 12 Apr 1999 09:17:28 +0200 (MET DST) Message-Id: <199904120717.JAA26054@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: mason@primenet.com.au's message of 10 Apr 1999 11:28:43 GMT Subject: Re: BUG: zsh-3.1.5-pws-14: parameter expansion not working properly mason@primenet.com.au wrote: > Here's a fragment of the expansion similar to that used in > cvsentries() in Misc/compctl-examples > > % zsh-3.1.5 > % a=("${(f@)$(echo foo; echo bar)}"); print -l $a > foo > bar > % a=("${${(f@)$(echo foo; echo bar)}:#f*}"); print -l $a > bar > % zsh-3.1.5-pws-14 > % a=("${(f@)$(echo foo; echo bar)}"); print -l $a > foo > bar > % a=("${${(f@)$(echo foo; echo bar)}:#f*}"); print -l $a > > % Yes, this has changed lately because the old behavior sometimes yielded unpredictable results. The rule of thumb is now that one should use the `(@)' flag whenever the thing is in double quotes and one wants to work on arrays. Bye Sven --- ../zold/Misc/compctl-examples Mon Oct 26 23:59:45 1998 +++ Misc/compctl-examples Mon Apr 12 09:14:44 1999 @@ -11,15 +11,15 @@ # page. # #------------------------------------------------------------------------------ -hosts=("${${(s: :)${(s: :)${${(f)$(/dev/null)}%%:*}"; do + for u in "${(@)${(@f)$(rwho 2>/dev/null)}%%:*}"; do reply=($reply ${u%% *}@${u##* }) done } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de