Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: surprise with echo
- X-seq: zsh-workers 34028
- From: Christian Neukirchen <chneukirchen@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: surprise with echo
- Date: Sun, 21 Dec 2014 23:35:28 +0100
- 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")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <54937E5B.2020008@eastlink.ca> <141218190653.ZM16331__11066.8365298354$1418958515$gmane$org@torch.brasslantern.com>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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 <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author