From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29372 invoked by alias); 21 Dec 2014 22:53:12 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34028 Received: (qmail 13211 invoked from network); 21 Dec 2014 22:52:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO, SPF_HELO_PASS,T_FSL_HELO_BARE_IP_2 autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Christian Neukirchen Subject: Re: surprise with echo Date: Sun, 21 Dec 2014 23:35:28 +0100 Message-ID: <87wq5k637z.fsf@gmail.com> References: <54937E5B.2020008@eastlink.ca> <141218190653.ZM16331__11066.8365298354$1418958515$gmane$org@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 141.84.9.5 In-Reply-To: <141218190653.ZM16331__11066.8365298354$1418958515$gmane$org@torch.brasslantern.com> (Bart Schaefer's message of "Thu, 18 Dec 2014 19:06:53 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Bart Schaefer writes: > It's how array expansion works in the "rc" shell, which is the source > from which this behavior is borrowed. There's probably an "rc" list > somewhere where you might get an explanation. Just for the sake of completeness, this actually differs between Byron's rc and the Bell Labs rc: % /usr/bin/rc ; echo $version 1.7.2 $Release: @(#)rc 1.7.2 2014-09-10 $ ; x=() ; echo foo$x foo % /opt/plan9/bin/rc % x=() % echo foo$x rc (/opt/plan9/bin/rc): null list in concatenation Neither is how RC_EXPAND_PARAM works, but I think that the zsh behavior makes most sense. (And is best enabled using foo$^x on demand.) -- Christian Neukirchen http://chneukirchen.org