[Top][All Lists]

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

Re: 'declare -f|-F FUNCNAME' fails if FUNCNAME contains a '['

From: Chet Ramey
Subject: Re: 'declare -f|-F FUNCNAME' fails if FUNCNAME contains a '['
Date: Tue, 24 Oct 2017 10:16:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/23/17 6:10 PM, address@hidden wrote:

> Bash Version: 4.3
> Patch Level: 46
> Release Status: release
> Description:
>       If a function FUNCNAME contains the '[' character, 'declare -F 
> FUNCNAME' and 'declare -f FUNCNAME'
>       fails:
>               bash: declare: `[': not a valid identifier
>       If called without argument FUNCNAME (to display all declared functions) 
> FUNCNAME is displayed
>       correctly.

Use `declare -fp' when you want to display function definitions to avoid

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

reply via email to

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