1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

37802: Clarify zparseopts documention. zparseopts "X::" specifier should also look for the optional argument in the word after "-X".

This commit is contained in:
Barton E. Schaefer 2016-01-26 22:44:14 -08:00
parent 25ca90e5ab
commit 8ddcdad0c1
2 changed files with 9 additions and 2 deletions

View file

@ -5,6 +5,11 @@
2016-01-26 Barton E. Schaefer <schaefer@brasslantern.com>
* 37802: Doc/Zsh/mod_zutil.yo: Clarify zparseopts description.
* 37802: Src/Modules/zutil.c: zparseopts "X::" specifier should
also look for the optional argument in the word after "-X".
* 37785: Src/params.c: skip autoload parameters for "typeset -p"
2016-01-25 Barton E. Schaefer <schaefer@zsh.org>

View file

@ -1833,7 +1833,8 @@ bin_zparseopts(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
if (o[1]) {
add_opt_val(d, o + 1);
break;
} else if (!(d->flags & ZOF_OPT)) {
} else if (!(d->flags & ZOF_OPT) ||
(pp[1] && pp[1][0] != '-')) {
if (!pp[1]) {
zwarnnam(nam, "missing argument for option: %s",
d->name);
@ -1859,7 +1860,8 @@ bin_zparseopts(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
if (*e)
add_opt_val(d, e);
else if (!(d->flags & ZOF_OPT)) {
else if (!(d->flags & ZOF_OPT) ||
(pp[1] && pp[1][0] != '-')) {
if (!pp[1]) {
zwarnnam(nam, "missing argument for option: %s",
d->name);