[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange expansion of <(cat p.main.{optional,extra})

From: Chet Ramey
Subject: Re: strange expansion of <(cat p.main.{optional,extra})
Date: Wed, 18 Apr 2007 22:36:24 -0400
User-agent: Thunderbird (Macintosh/20070326)

Stephane Chazelas wrote:
> On Tue, Apr 17, 2007 at 08:16:53PM -0400, Chet Ramey wrote:

> How does it get exanded to
> echo <(cat p.main.optional) <(cat p.main,extra)
> though?
> If it were textual, I would expect:
> echo <(cat p.main.optional) p.main,extra)

It's still a word expansion.  The parser splits the input into words
before brace expansion takes place.

> And what about:
> echo $(cat p.main.{optional,extra})
> This resolves to
> echo $(cat p.main.optional p.main.extra)
> I can't see any reason why $(...) and <(...) should be treated
> differently.

Yes, that's a separate issue worth consideration.  There is already code
to treat command substitution specially and defer expansion to the
subshell.  It might be a good idea to treat process substitution the same


``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]