bug-bash
[Top][All Lists]
Advanced

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

Re: Shopt ignored in process substitutions


From: Nikolai Kondrashov
Subject: Re: Shopt ignored in process substitutions
Date: Wed, 28 Jan 2015 20:11:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 01/28/2015 03:45 PM, Chet Ramey wrote:
On 1/28/15 4:48 AM, Nikolai Kondrashov wrote:
However, the newer versions would fail like this:

     bash: command substitution: line 2: syntax error near unexpected token `('
     bash: command substitution: line 2: `echo !(*))'

Is this intended? If not, can this be fixed?

As of bash-4.3.23, process substitutions are parsed by the parent shell in
order to correctly find the closing `)', just like command substitutions.
Read the thread beginning at

http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00056.html

for a discussion of the problem.

Since the construct is parsed before being executed, extglob is not
enabled during parsing.  This is a problem similar to enabling extglob
in shell functions.

Understood. Thank you, Chet.

This is unfortunate, but I suspect parser cleanliness is worth it.

Nick



reply via email to

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