summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordana <dana@dana.is>2025-05-19 18:30:08 -0500
committerdana <dana@dana.is>2025-05-19 18:31:56 -0500
commit87c055fb4d076c0d9bfffbef16ac8dd9348903df (patch)
treecd95880bfd8f2849d6af0bb43efa0ebb90754e75
parent53633: docs: add note about `compadd -o` requiring explicit group name (diff)
downloadzsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.tar
zsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.tar.gz
zsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.tar.bz2
zsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.tar.lz
zsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.tar.xz
zsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.tar.zst
zsh-87c055fb4d076c0d9bfffbef16ac8dd9348903df.zip
53636: docs: clarify valid parameter names
-rw-r--r--ChangeLog2
-rw-r--r--Doc/Zsh/params.yo10
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 51f4dac6d..a31cf633a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index c52b6ba91..59e964519 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -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).