about summary refs log tree commit diff
path: root/Doc/Zsh/builtins.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-05-28 18:32:39 +0100
committerPeter Stephenson <pws@zsh.org>2015-05-28 18:32:39 +0100
commit2b08d0ed6747a4acf44b73068bfafc54ca1d0acf (patch)
tree6b2ef1ca29d0633ee231e6181a1b0d5e16356691 /Doc/Zsh/builtins.yo
parentcb596a55d921cb638a3cf0ede3ee60ae13728c10 (diff)
downloadzsh-2b08d0ed6747a4acf44b73068bfafc54ca1d0acf.tar.gz
zsh-2b08d0ed6747a4acf44b73068bfafc54ca1d0acf.tar.xz
zsh-2b08d0ed6747a4acf44b73068bfafc54ca1d0acf.zip
35318: POSIX_BUILTINS behaviour for getopts.
It needs to keep OPTIND, as well as the index within the
string pointed to by OPTIND, global in this case.
Diffstat (limited to 'Doc/Zsh/builtins.yo')
-rw-r--r--Doc/Zsh/builtins.yo3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index a2c03bcc4..f8e4edf91 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -866,7 +866,8 @@ vindex(OPTARG, use of)
 
 The first option to be examined may be changed by explicitly assigning
 to tt(OPTIND).  tt(OPTIND) has an initial value of tt(1), and is
-normally reset to tt(1) upon exit from a shell function.  tt(OPTARG)
+normally set to tt(1) upon entry to a shell function and restored
+upon exit (this is disabled by the tt(POSIX_BUILTINS) option).  tt(OPTARG)
 is not reset and retains its value from the most recent call to
 tt(getopts).  If either of tt(OPTIND) or tt(OPTARG) is explicitly
 unset, it remains unset, and the index or option argument is not