[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: local -p outputs invalid declare -- -
From: |
Chet Ramey |
Subject: |
Re: local -p outputs invalid declare -- - |
Date: |
Wed, 6 Jul 2022 11:04:47 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 7/1/22 1:16 AM, Emanuele Torre wrote:
> Bash Version: 5.1
> Patch Level: 16
> Release Status: release
>
> Description:
> `local -p' (and also `declare -p'/`typeset -p') outputs
> "declare -- -" when used in a function that has declared
> `local -'.
>
> `declare -' (and `typeset -') is not a valid command, not even
> in functions.
> The only valid way to localise shell options is `local -'
Thanks for the report.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/