On Tue, Jul 28, 2020 at 9:25 PM Chet Ramey <chet.ra...@case.edu> wrote: > > > > The online version of the document for declare told the following usage: > > > > > > declare > > declare [-aAfFgilnrtux] [-p] [name[=value] …] > > [...] > > The -p option will display the attributes and values of each name. > > When -p is used with name arguments, additional options, other than -f > > and -F, are ignored. > > > > > > But I can't find the same notes from the local version of the document > > for this command given by `help declare', any hints for this problem? > > The help text built into bash is a much shorter version of the manual > text. It's intended to be a hint, with the man page providing the detail.
Thanks a lot for your help. I rechecked the man page with the following command and confirmed the comments you told above: $ man bash | egrep -A10 '^[ ]*declare \[' declare [-aAfFgilnrtux] [-p] [name[=value] ...] typeset [-aAfFgilnrtux] [-p] [name[=value] ...] Declare variables and/or give them attributes. If no names are given then display the values of variables. The -p option will display the attributes and values of each name. When -p is used with name arguments, additional options, other than -f and -F, are ig‐ nored. -- Hongyi Zhao <hongyi.z...@gmail.com>