* PATCH: _arguments (was Re: options are completed for non-option argument.)
@ 2000-07-17 8:01 Sven Wischnowsky
2000-07-17 10:24 ` Tanaka Akira
0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 2000-07-17 8:01 UTC (permalink / raw)
To: zsh-workers
Tanaka Akira wrote:
> Z(2):akr@flux% Src/zsh -f
> flux% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> flux% _tst () {
> function> _arguments -s '-a' '-b' '-c' ':words:compadd - abyyy abzzz'
> function> }
> flux% tst ab<TAB><TAB>
> -a -c
>
> Options are completed for non-option argument.
Oops. Problem with 12241, which should have fixed:
Wayne Davison wrote:
> I haven't had a chance to look into this yet, but if I type
> "perl -cw file<tab>" it won't complete the perl script. I have
> to type "perl -c -w file<tab>", which is a pain.
Back to another message from Akira:
> Z(2):akr@flux% Src/zsh -f
> flux% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> flux% _tst () { _arguments '-e::*last:b:' }
> flux% tst -e <TAB>
> _arguments:294: command not found: b
The syntax is `-e:*last::message:action'.
Bye
Sven
Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.37
diff -u -r1.37 computil.c
--- Src/Zle/computil.c 2000/07/13 11:04:00 1.37
+++ Src/Zle/computil.c 2000/07/17 07:49:13
@@ -1112,7 +1112,7 @@
}
} else if (!p || (p && !p->active))
return NULL;
- pp = p;
+ pp = (p->name[0] == pre ? p : NULL);
p = NULL;
}
if (pp && end)
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: _arguments (was Re: options are completed for non-option argument.)
2000-07-17 8:01 PATCH: _arguments (was Re: options are completed for non-option argument.) Sven Wischnowsky
@ 2000-07-17 10:24 ` Tanaka Akira
0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 2000-07-17 10:24 UTC (permalink / raw)
To: zsh-workers
In article <200007170801.KAA05649@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> > Z(2):akr@flux% Src/zsh -f
> > flux% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> > flux% _tst () { _arguments '-e::*last:b:' }
> > flux% tst -e <TAB>
> > _arguments:294: command not found: b
>
> The syntax is `-e:*last::message:action'.
Oops. I understood my fault.
--
Tanaka Akira
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-07-17 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-17 8:01 PATCH: _arguments (was Re: options are completed for non-option argument.) Sven Wischnowsky
2000-07-17 10:24 ` Tanaka Akira
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).