[Top][All Lists]

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

documentation... readonly help is not accurate

From: Gotmy Nick
Subject: documentation... readonly help is not accurate
Date: Sun, 3 Mar 2013 22:40:58 +0100


   Sorry if this has been reported earlier, but I can't find nothing
related in the archives.

      $ help readonly | grep -- '-p'
      readonly: readonly [-aAf] [name[=value] ...] or readonly -p
            -p        display a list of all readonly variables and functions

      $ echo $BASH_VERSION

   I think the description should say "or" instead of "and". I think
it's the sorter way to clarify the behavior.

   This is, it will not print readonly functions unless called with
-fp, and in such case, it will not print variables, so in my opinion,
using "or" could be more accurate than "and".

   In the man page, it says... "If no name arguments are given, or if
the -p option is supplied, a list of all readonly names is printed."
but in practice it only prints variables (including arrays and
associative arrays). The only thing it says about -f is "If the -f
option is supplied, the functions corresponding to the names are so
marked.". Maybe it could be better something like "If the -f option is
supplied, restricts _name_ to functions" or something similar.

   On "help declare" uses in the descriptions "restrict action ..."
and points to "NAME", while "help readonly" uses "refer to ..."
(indexed array, associative, etc), maybe it needs a review for clarity
and consistency. Also, for completion, maybe the "description" line of
"help readonly" or "help -d readonly" (as well as for "help declare")
could be updated from "variables" to "variables or functions".

   A lot of thanks.

Best regards

IƱigo Tejedor Arrondo

reply via email to

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