* Some documentation on $0 vs. KSH_ZERO_SUBSCRIPT
@ 2013-10-19 21:25 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2013-10-19 21:25 UTC (permalink / raw)
To: zsh-workers
Some clarification that $0 is not exactly a positional parameter.
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 97087a1..9d951bb 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -431,9 +431,15 @@ of a shell function, shell script, or the shell itself; see
noderef(Invocation), and also noderef(Functions).
The parameter var(n), where var(n) is a number,
is the var(n)th positional parameter.
+The parameter `tt($0)' is a special case, see
+noderef(Parameters Set By The Shell).
+
The parameters tt(*), tt(@) and tt(argv) are
arrays containing all the positional parameters;
thus `tt($argv[)var(n)tt(])', etc., is equivalent to simply `tt($)var(n)'.
+Note that the options tt(KSH_ARRAYS) or tt(KSH_ZERO_SUBSCRIPT) apply
+to these arrays as well, so with either of those options set,
+`tt(${argv[0]})' is equivalent to `tt($1)' and so on.
Positional parameters may be changed after the shell or function starts by
using the tt(set) builtin, by assigning to the tt(argv) array, or by direct
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-19 21:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-19 21:25 Some documentation on $0 vs. KSH_ZERO_SUBSCRIPT Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).