diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-05 07:37:17 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-05 07:37:17 +0000 |
commit | c05f118fc2f40d8e4b1b73926c5d74a6dc14281a (patch) | |
tree | 3f460bcb1c755acfa95ac2696fd63dc7718d579c /Src/Zle | |
parent | 82ca135d34bb2d27ead24a9d8d28bb4428de2abd (diff) | |
download | zsh-c05f118fc2f40d8e4b1b73926c5d74a6dc14281a.tar.gz zsh-c05f118fc2f40d8e4b1b73926c5d74a6dc14281a.tar.xz zsh-c05f118fc2f40d8e4b1b73926c5d74a6dc14281a.zip |
fix for completion arguments of options, don't use all of them at once (11172)
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/computil.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 77887a03e..8492b6020 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -1438,21 +1438,27 @@ ca_set_data(char *opt, Caarg arg, char **args, int single) if (single) break; - if (!opt && arg->num >= 0 && !arg->next && miss) - arg = ca_laststate.d->rest; - else { - onum = arg->num; - rest = (onum != arg->min && onum == ca_laststate.nth); - if ((arg = arg->next)) { - if (arg->num != onum + 1) - miss = 1; - } else if (rest || (oopt > 0 && !opt)) { + if (!opt) { + if (arg->num >= 0 && !arg->next && miss) arg = ca_laststate.d->rest; - oopt = -1; + else { + onum = arg->num; + rest = (onum != arg->min && onum == ca_laststate.nth); + if ((arg = arg->next)) { + if (arg->num != onum + 1) + miss = 1; + } else if (rest || (oopt > 0 && !opt)) { + arg = ca_laststate.d->rest; + oopt = -1; + } } + } else { + if (!lopt) + break; + arg = arg->next; } } - if (!single && opt && lopt) { + if (!single && opt && (lopt || ca_laststate.oopt)) { opt = NULL; arg = ca_get_arg(ca_laststate.d, ca_laststate.nth); |