bug-bash
[Top][All Lists]
Advanced

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

Error in bash documentation for builtin declare


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

Hello,

there is an error in the bash documentation:
    https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins

In the 'declare' builtin, option '-n',  last sentence:
    "The nameref attribute cannot be applied to array variables"
is actually wrong: it can be applied to indexed and associative arrays (since bash 4.3+)

(tested for bash version : 4.3.48(1)-release (x86_64-pc-linux-gnu))

it can even be applied to functions, except that for calling, explicit dereference must be given.

Cheers,
Edouard Thiel

--

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]