bug-bash
[Top][All Lists]
Advanced

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

Re: error parsing file glob when importing function from environment


From: Chet Ramey
Subject: Re: error parsing file glob when importing function from environment
Date: Thu, 26 Feb 2015 16:35:14 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 2/26/15 2:37 PM, adyer@ptc.com wrote:

> Bash Version: 4.2
> Patch Level: 47
> Release Status: release
> 
> Description:
>       A bash function containing the syntax "files=( !(PAT) )" fails to parse
>   in a sub-shell when imported from the environment (to which it was exported
>   by the parent shell).

The extended globbing syntax is accepted by the parser when the `extglob'
shell option is enabled.  If you (or some agent) export a function using
that syntax, you will need to make sure that the extglob option is enabled
when it's parsed by the subshell.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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