diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-04 11:26:26 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-04 11:26:26 +0000 |
commit | 87b625f15f27067d2bdc94ab1a663bf7c3c1a893 (patch) | |
tree | 40bbd8da967380ee1e03c0c24c32bfe7e2e4aebf /Src/Zle | |
parent | 4df35781480766a5da9099daf16f78b89f36e651 (diff) | |
download | zsh-87b625f15f27067d2bdc94ab1a663bf7c3c1a893.tar.gz zsh-87b625f15f27067d2bdc94ab1a663bf7c3c1a893.tar.xz zsh-87b625f15f27067d2bdc94ab1a663bf7c3c1a893.zip |
make _next_tags be usable with menu-completion
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 3260ea11e..2a9ebbaa5 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -746,11 +746,6 @@ callcompfunc(char *s, char *fn) !strcmp(compinsert, "unambiguous") || !strcmp(compinsert, "automenu-unambiguous")) useline = 1, usemenu = 0; - else if (!strcmp(compinsert, "menu")) - useline = 1, usemenu = 1; - else if (!strcmp(compinsert, "auto") || - !strcmp(compinsert, "automenu")) - useline = 1, usemenu = 2; else if (!strcmp(compinsert, "all")) useline = 2, usemenu = 0; else if (idigit(*compinsert)) { @@ -763,8 +758,24 @@ callcompfunc(char *s, char *fn) insgnum = atoi(m + 1); } insspace = (compinsert[strlen(compinsert) - 1] == ' '); - } else - useline = usemenu = 0; + } else { + char *p; + + if (strpfx("menu", compinsert)) + useline = 1, usemenu = 1; + else if (strpfx("auto", compinsert)) + useline = 1, usemenu = 2; + else + useline = usemenu = 0; + + if (useline && (p = strchr(compinsert, ':'))) { + insmnum = atoi(++p); + if ((p = strchr(p, ':'))) { + insgroup = 1; + insgnum = atoi(p + 1); + } + } + } startauto = (compinsert && !strcmp(compinsert, "automenu-unambiguous")); useexact = (compexact && !strcmp(compexact, "accept")); |