diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Completion/Core/_main_complete | 4 | ||||
-rw-r--r-- | Src/Zle/computil.c | 7 |
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 22a29dc87..d0a119adb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2000-07-13 Sven Wischnowsky <wischnow@zsh.org> + * 12241: Completion/Core/_main_complete, Src/Zle/computil.c: fix + for _arguments with single-letter options: recognize + option-strings with multiple options; in _main_complete stop + trying completers when one called _message, don't display warnings + in such cases + * 12238: Src/Zle/zle_thingy.c: fix zle widget -n num with num>9 * 12237: Src/hist.c, Src/lex.c: slightly improved (z) flag for diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 707b48d72..ee15a4b65 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -156,6 +156,8 @@ for tmp in "$_completers[@]"; do fi (( _matcher_num++ )) done + [[ -n "$_comp_mesg" ]] && break + (( _completer_num++ )) done @@ -265,7 +267,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then elif [[ nm -le 1 && -n "$_comp_mesg" ]]; then compstate[insert]='' compstate[list]='list force messages' -elif [[ nm -eq 0 && +elif [[ nm -eq 0 && -z "$_comp_mesg" && $#_lastdescr -ne 0 && $compstate[old_list] != keep ]] && zstyle -s ":completion:${curcontext}:warnings" format format; then diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 9ec338b7b..c26e9abc4 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -1088,7 +1088,7 @@ ca_get_opt(Cadef d, char *line, int full, char **end) static Caopt ca_get_sopt(Cadef d, char *line, char **end, LinkList *lp) { - Caopt p; + Caopt p, pp = NULL; char pre = *line++; LinkList l = NULL; @@ -1112,11 +1112,12 @@ ca_get_sopt(Cadef d, char *line, char **end, LinkList *lp) } } else if (!p || (p && !p->active)) return NULL; + pp = p; p = NULL; } - if (p && end) + if (pp && end) *end = line; - return p; + return pp; } /* Return the n'th argument definition. */ |