bug-bash
[Top][All Lists]
Advanced

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

Re: Error in bash documentation for builtin declare


From: Edouard Thiel
Subject: Re: Error in bash documentation for builtin declare
Date: Fri, 6 Nov 2020 18:21:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0



Le 06/11/2020 à 18:06, Chet Ramey a écrit :
On 11/6/20 11:53 AM, Edouard Thiel wrote:

This is more clear, and in fact, ok for me (if subscripted means
associative?);
the link above is not up to date.
The same language appears in the "Shell Parameters" section of the manual
at the above link, just as it does in the "PARAMETERS" section of the
manual page.
in fact, I didn't see this. The #Bash-Builtins section misled me. Sorry!
By the way, I have seen that the nameref works more or less for functions:
$ foo() { echo "hello" ;}
$ declare -n bar=foo
but the reference has to be dereferenced when calling:
$ ${!bar}
hello

is it still the case in bash 5?
Sure, it seems harmless to allow it.
I mean, I was surprised I couldn't simply run
$ bar

thanks for your fast responses
Cheers, Edouard

PS I love teaching bash :)




--

Professeur Edouard THIEL                  http://j.mp/ethiel
Département Informatique et Interactions  http://j.mp/dept-ii
UFR Sciences, Aix-Marseille Université    http://j.mp/fs-amu
Laboratoire d'Informatique et Systèmes    http://j.mp/lis-amu



reply via email to

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