mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 11:01:13 +02:00
32600: in _arguments, "-" is not an option letter after another "-"
This commit is contained in:
parent
6a201af341
commit
f5fe52c495
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2014-05-08 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* m0viefreak: 32600: Src/Zle/computil.c: fix problem with
|
||||
_arguments thinking -- is a single letter option called '-',
|
||||
which it isn't.
|
||||
|
||||
2014-05-06 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 32597: Functions/VCS_Info/Backends/VCS_INFO_get_data_git:
|
||||
|
|
|
@ -1500,9 +1500,11 @@ parse_cadef(char *nam, char **args)
|
|||
nodopts++;
|
||||
|
||||
/* If this is for single-letter option we also store a
|
||||
* pointer for the definition in the array for fast lookup. */
|
||||
* pointer for the definition in the array for fast lookup.
|
||||
* But don't treat '--' as a single option called '-' */
|
||||
|
||||
if (single && name[1] && !name[2])
|
||||
|
||||
if (single && name[1] && !name[2] && name[1] != '-')
|
||||
ret->single[STOUC(name[1])] = opt;
|
||||
|
||||
if (again == 1) {
|
||||
|
@ -2034,7 +2036,9 @@ ca_parse_line(Cadef d, int multi, int first)
|
|||
state.optbeg = state.argbeg = state.inopt = cur;
|
||||
state.argend = argend;
|
||||
state.singles = (d->single && (!pe || !*pe) &&
|
||||
state.curopt->name[1] && !state.curopt->name[2]);
|
||||
state.curopt->name[1] && !state.curopt->name[2] &&
|
||||
/* Don't treat '--' as a single option called '-' */
|
||||
state.curopt->name[1] != '-');
|
||||
|
||||
if (!state.oargs[state.curopt->num])
|
||||
state.oargs[state.curopt->num] = znewlinklist();
|
||||
|
|
Loading…
Reference in a new issue