From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _archie
Date: Thu, 21 Oct 1999 12:31:34 +0200 (MET DST) [thread overview]
Message-ID: <199910211031.MAA04855@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 21 Oct 1999 18:05:48 +0900
Tanaka Akira wrote:
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d'
> is27e1u11% compconf describe_options=yes describe_values=yes option_prefix=yes
>
> (1) archie -N<TAB>
> flex -C<TAB> has same problem.
> (2) bison -b <TAB>
> (3) bison -vV<TAB>
> (4) cvs -<TAB>
Aargh! Sorry.
Bye
Sven
diff -u oldsrc/Zle/computil.c Src/Zle/computil.c
--- oldsrc/Zle/computil.c Thu Oct 21 10:33:09 1999
+++ Src/Zle/computil.c Thu Oct 21 12:28:22 1999
@@ -863,8 +863,6 @@
} else if (!p || !p->active || (line[1] && p->args) ||
p->name[0] != pre)
return NULL;
- else
- p = NULL;
if (p && end)
*end = line;
return p;
@@ -973,7 +971,7 @@
addlinknode(state.oargs[state.curopt->num], ztrdup(line));
} LASTALLOC;
}
- state.opt = (state.def->type == CAA_OPT && line[0] && line[1]);
+ state.opt = (state.def->type == CAA_OPT);
if (state.def->type == CAA_REST || state.def->type == CAA_RARGS ||
state.def->type == CAA_RREST) {
@@ -984,13 +982,17 @@
}
} else if ((state.def = state.def->next))
state.argbeg = cur;
- else
+ else {
state.curopt = NULL;
+ state.opt = 1;
+ }
} else {
- state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
- state.arg = 1;
+ state.opt = state.arg = 1;
state.curopt = NULL;
}
+ if (state.opt)
+ state.opt = (line[0] ? (line[1] ? 2 : 1) : 0);
+
pe = NULL;
if (state.opt == 2 && (state.curopt = ca_get_opt(d, line, 0, &pe))) {
@@ -1018,7 +1020,9 @@
addlinknode(state.oargs[state.curopt->num], ztrdup(pe));
} LASTALLOC;
}
- if (!state.def)
+ if (state.def)
+ state.opt = 0;
+ else
state.curopt = NULL;
} else if (state.opt == 2 && d->single &&
(state.curopt = ca_get_sopt(d, line, 0, &pe))) {
@@ -1051,7 +1055,9 @@
addlinknode(state.oargs[state.curopt->num], ztrdup(pe));
} LASTALLOC;
}
- if (!state.def)
+ if (state.def)
+ state.opt = 0;
+ else
state.curopt = NULL;
} else if (state.arg) {
if (state.inopt) {
@@ -1062,7 +1068,7 @@
(state.def->type == CAA_RREST ||
state.def->type == CAA_RARGS)) {
state.inrest = 0;
- state.opt = 0;
+ state.opt = (cur == state.nargbeg + 1);
state.optbeg = state.nargbeg;
state.argbeg = cur - 1;
@@ -1111,9 +1117,10 @@
ca_laststate.ddef = NULL;
ca_laststate.doff = 0;
} else if (cur == compcurrent && !ca_laststate.def) {
- if ((ca_laststate.def = ddef))
+ if ((ca_laststate.def = ddef)) {
ca_laststate.doff = doff;
- else {
+ ca_laststate.opt = 0;
+ } else {
ca_laststate.def = adef;
ca_laststate.ddef = NULL;
ca_laststate.optbeg = state.nargbeg;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-10-21 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-21 10:31 Sven Wischnowsky [this message]
1999-10-21 11:28 ` Tanaka Akira
-- strict thread matches above, loose matches on Subject: below --
1999-10-21 12:42 Sven Wischnowsky
1999-10-21 8:32 Sven Wischnowsky
1999-10-21 9:05 ` Tanaka Akira
1999-10-18 9:16 Sven Wischnowsky
1999-10-20 16:15 ` Tanaka Akira
1999-10-16 4:47 Tanaka Akira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199910211031.MAA04855@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).