Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Surprising parsing result with anonymous functions and for loops
- X-seq: zsh-workers 33244
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: Surprising parsing result with anonymous functions and for loops
- Date: Thu, 25 Sep 2014 15:21:43 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HBDcD5y8bmfEl9lzl5bLEH0KT+iioIwuaa9tkzocgDE=; b=VGHSkoGTHRWt2zJCjdcPBEXNZB64+RX/o6Pp4i3bJHuTROsRA8edqUJL1xqfYMJCOo utYrbsvkPTCb1l3gwO54BbNwn1vJGP80ltro6GuWhk470A+993sf/HlFI48rYiD/rFtf /W5k3faYDHl0r7LaedD6Oe+Oz9L3gfTFm30VS8E6BnKO1mf/jLwQpfVJnYLXscLUOb8/ NBUQA28uUx1cQ8F+nFN9V4M+w5w2xlgmpcwHZHmz5HBuKYEtAFqAcjRE8Od/e2PXuPGr y1P+ZrTNp7t5y6XzlbB9icszEXeAypIZlrBvyFSbEXeY/pC0TI/fTtP+9V8NZHnxLlme 8lVw==
- In-reply-to: <20140925123906.53c1d853@pwslap01u.europe.root.pri>
- 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: <CAHYJk3SXb_hgz-abLaoLeU=U-Y0zwm=vHv-o+Oeg6=C3CedjUQ@mail.gmail.com> <20140924152625.73dfa6d9@pwslap01u.europe.root.pri> <CAHYJk3TR=EaB2yOTO_ZDGtnxrPatUNoj4CrG2SMy62vooLaUeA@mail.gmail.com> <CAH+w=7ZOaTpcsQY+Kt5hnDr218LOfmz21Xp1-rZqnaD0zbS0Zg@mail.gmail.com> <CAHYJk3TZat+YOyx6BDTBZHyqppRE=97vKaAw4z0nmu_4nTOB+A@mail.gmail.com> <20140925123906.53c1d853@pwslap01u.europe.root.pri>
On 25 September 2014 13:39, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Thu, 25 Sep 2014 12:02:55 +0200
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> Okay, but does anyone at least agree that doing alias expansion at
>> that point is highly surprising?
>
> You mean regardless of function behaviour?
>
> % alias foo=bar
> % for i in 1; do : ; done foo
> zsh: parse error near `bar'
Ah, when i tested this i didn't realize it always happened, since i
tested with my ls alias (so the error said `ls' regardless). So yes
and no, it does happen regardless, but if you want to consider it a
feature that () for a { echo $a } ls works, then my meaning was that
it should at least print the exact arguments given. :) ("you" in this
case being Bart, not actually you). I have nothing intelligent to say
about the rest of the mail except for nodding sagely while reading it,
so I'll elide it.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author