Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Block comments ala Ray
- X-seq: zsh-workers 48064
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Block comments ala Ray
- Date: Mon, 15 Feb 2021 14:35:43 -0800
- Archived-at: <https://zsh.org/workers/48064>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/CAH%2Bw%3D7aPW0jM2KwAaxqd1v7Dxx3jm%2BJZyWWQ-J0oMGqBq%3D08NQ%40mail.gmail.com>
- In-reply-to: <20210215213025.GC18776@tarpaulin.shahaf.local2>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YZREq7FbJCCoWoJ-vQ7+P5Z=_mKB-aStoMiBRupqD_wA@mail.gmail.com> <CAN=4vMonpZHPSarsC778_GMbD_h4ioTwT+bTFU=FZ7_zbXaMqQ@mail.gmail.com> <CAH+w=7Zd2gY-s5T1dDNEEujAh6197MzrUD-iZrVwZLzD=L7xVQ@mail.gmail.com> <YCadpUsj860XWVv+@CptOrmolo.darkstar> <CAH+w=7aaTmz-KtQwFLRnLmRhWn+yGurP=kHxmWEP1=KhYzOb6w@mail.gmail.com> <20210215213025.GC18776@tarpaulin.shahaf.local2>
On Mon, Feb 15, 2021 at 1:30 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> > On Fri, Feb 12, 2021 at 7:24 AM Matthew Martin <phy1729@xxxxxxxxx> wrote:
> > >
> > > echo foo `# a comment` bar
>
> Could we optimize away the fork, like «$(<foo)»?
Not easily. The contents of $(...) and `...` are given a rudimentary
parse, but are preserved verbatim, so my reading is that shell has
already forked before it "knows" that the entire substitution is a
comment. "$(<" can be treated specially because the tokens are
recognized.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author