diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2006-07-26 10:13:26 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2006-07-26 10:13:26 +0000 |
commit | 799f98e76f24dca40b00f828b10c89fecde7a8aa (patch) | |
tree | 30ff0b35f644c6fb2530684cf6a9b3c134e6f1d6 | |
parent | 04acdec08de4742e5f76c09ebb6db4bc0990046b (diff) |
clarifications for OPTIND:
hunk #1 from tamas tevesz;
hunk #2 from otto;
ok otto
-rw-r--r-- | bin/ksh/ksh.1 | 8 | ||||
-rw-r--r-- | bin/ksh/sh.1 | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1 index a23fc0d80fb..abc684f89bd 100644 --- a/bin/ksh/ksh.1 +++ b/bin/ksh/ksh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ksh.1,v 1.115 2006/06/01 09:31:12 jmc Exp $ +.\" $OpenBSD: ksh.1,v 1.116 2006/07/26 10:13:25 jmc Exp $ .\" .\" Public Domain .\" @@ -1500,7 +1500,7 @@ When using .Ic getopts , it contains the argument for a parsed option, if it requires one. .It Ev OPTIND -The index of the last argument processed when using +The index of the next argument to be processed when using .Ic getopts . Assigning 1 to this parameter causes .Ic getopts @@ -3170,7 +3170,9 @@ Each time .Ic getopts is invoked, it places the next option in the shell parameter .Ar name -and the index of the next argument to be processed in the shell parameter +and the index of the argument to be processed by the next call to +.Ic getopts +in the shell parameter .Ev OPTIND . If the option was introduced with a .Ql + , diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1 index 1a564aef7bd..c622cad957c 100644 --- a/bin/ksh/sh.1 +++ b/bin/ksh/sh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sh.1,v 1.72 2006/03/07 09:31:01 jmc Exp $ +.\" $OpenBSD: sh.1,v 1.73 2006/07/26 10:13:25 jmc Exp $ .\" .\" Public Domain .\" @@ -1211,7 +1211,7 @@ When using .Ic getopts , it contains the argument for a parsed option, if it requires one. .It Ev OPTIND -The index of the last argument processed when using +The index of the next argument to be processed when using .Ic getopts . Assigning 1 to this parameter causes .Ic getopts @@ -2429,7 +2429,9 @@ Each time .Ic getopts is invoked, it places the next option in the shell parameter .Ar name -and the index of the next argument to be processed in the shell parameter +and the index of the argument to be processed by the next call to +.Ic getopts +in the shell parameter .Ev OPTIND . If the option was introduced with a .Ql + , |