Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
surprise with echo
- X-seq: zsh-users 19576
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: surprise with echo
- Date: Thu, 18 Dec 2014 17:24:43 -0800
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
test()
{
echo "echoing1: $@"
echo "echoing2: $*"
echo "echoing3: $* $@ killed"
echo "echoing4: $@ $* dead"
}
$ test
echoing2:
... that catches me completely by surprise. " $@ "
anywhere in the string kills it dead. I traced it back
to:
setopt rc_expand_param
Why should it do that? It's very cool what it permits
as explained in 'the book' p. 288, but is the above
part and parcel of that?
Of course there's nothing to print, but why kill the
entire string? Something about a null array?
Can that be prevented? It's all fine if there is an
argument, of course. Is this a feature? One could
deliberately design it so that nothing gets printed
in case of no argument, still it seem counterintuitive.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author