On 10/30/17 2:56 PM, PJ Eby wrote:

> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
> 
> Description:
> declare -F fails if function name contains '[', even if it exists.
> This makes it impossible to get the line number and file for such
> functions, as it is only available via declare -F (*without* -p).
> This bug appears to be in all versions of bash that have arrays
> enabled; in 3.2 it just fails silently, without an error message.
> 
> Repeat-By:
> shopt -s extdebug; declare -F some[name]
> 
> Fix:
> In builtins/declare.def, the strchr('[') should be &&'d with (flags_on
> & att_function) == 0

Thanks for the report; good catch.

Chet



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

Reply via email to