1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-06-19 09:48:03 +02:00

53636: docs: clarify valid parameter names

This commit is contained in:
dana 2025-05-19 18:30:08 -05:00
parent d02b58b96a
commit 87c055fb4d
2 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,7 @@
2025-05-19 dana <dana@dana.is>
* 53636: Doc/Zsh/params.yo: clarify valid parameter names
* with RocketDev: 53633 (see github #135): Doc/Zsh/compwid.yo:
add note about `compadd -o` requiring explicit group name

View file

@ -4,9 +4,13 @@ cindex(parameters)
cindex(variables)
sect(Description)
A parameter has a name, a value, and a number of attributes.
A name may be any sequence of alphanumeric
characters and underscores, or the single characters
`tt(*)', `tt(@)', `tt(#)', `tt(?)', `tt(-)', `tt($)', or `tt(!)'.
User-assignable parameter names may contain alphanumeric characters,
underscores, and (per the description of namespaces below) dots.
They may not begin with a number, except for positional parameters
(tt($1), tt($2), etc.), whose names consist em(only) of numbers. There
are also special shell parameters with single-character names such as
`tt(*)', `tt(@)', `tt(#)', `tt(?)', `tt(-)', `tt($)', and `tt(!)'.
These are described below.
A parameter whose name begins with an alphanumeric or underscore is also
referred to as a em(variable).