mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
31849: document effect of KSH_ZERO_SUBSCRIPT on the argv special array
This commit is contained in:
parent
8879c46a48
commit
ada42926b1
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-10-19 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 31849: Doc/Zsh/params.yo: note effect of KSH_ZERO_SUBSCRIPT
|
||||||
|
on the arrays of positional parameters e.g. ${argv[0]} vs. $0
|
||||||
|
|
||||||
2013-10-18 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
2013-10-18 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
* 31846: Src/exec.c: fix NOEXEC option in execsimple().
|
* 31846: Src/exec.c: fix NOEXEC option in execsimple().
|
||||||
|
|
|
@ -431,9 +431,15 @@ of a shell function, shell script, or the shell itself; see
|
||||||
noderef(Invocation), and also noderef(Functions).
|
noderef(Invocation), and also noderef(Functions).
|
||||||
The parameter var(n), where var(n) is a number,
|
The parameter var(n), where var(n) is a number,
|
||||||
is the var(n)th positional parameter.
|
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
|
The parameters tt(*), tt(@) and tt(argv) are
|
||||||
arrays containing all the positional parameters;
|
arrays containing all the positional parameters;
|
||||||
thus `tt($argv[)var(n)tt(])', etc., is equivalent to simply `tt($)var(n)'.
|
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
|
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
|
using the tt(set) builtin, by assigning to the tt(argv) array, or by direct
|
||||||
|
|
Loading…
Reference in a new issue