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