Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: BUG: Problem with _urls and small doc patch
- X-seq: zsh-workers 10965
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: BUG: Problem with _urls and small doc patch
- Date: Thu, 27 Apr 2000 11:22:37 +0200 (MET DST)
- In-reply-to: Felix Rosencrantz's message of Wed, 26 Apr 2000 23:51:02 -0700 (PDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Felix Rosencrantz wrote:
> ...
>
> I tried using completion with the _urls completer and noticed some strange
> behavior:
> w3m http://local<TAB>_all_labels:39: command not found: -M
> host
>
> I looked a little bit, and noticed the problem seems to come from this line:
> _urls:52: _wanted -C -f files _files "$@" && return 0
>
> There may be other problems. But it looks like there is a missing context
> name.
Missing `expl' and description.
> ps i've included a patch to the manual to mention that _wanted takes the
> -C flag.
I've committed this, too.
And the patch below contains it, so that people without CVS don't have
get it out of that attachment (and so that it is relative to the main
distribution directory).
Bye
Sven
Index: Completion/User/_urls
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/User/_urls,v
retrieving revision 1.4
diff -u -r1.4 _urls
--- Completion/User/_urls 2000/04/11 07:57:57 1.4
+++ Completion/User/_urls 2000/04/27 09:20:12
@@ -49,7 +49,7 @@
if [[ "$1" = -f ]]; then
shift
- _wanted -C -f files _files "$@" && return 0
+ _wanted -C -f files expl file _files "$@" && return 0
fi
ipre="$IPREFIX"
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.23
diff -u -r1.23 compsys.yo
--- Doc/Zsh/compsys.yo 2000/04/27 08:21:10 1.23
+++ Doc/Zsh/compsys.yo 2000/04/27 09:20:13
@@ -2590,7 +2590,7 @@
done)
)
findex(_wanted)
-item(tt(_wanted) [ tt(-12VJ) ] var(tag) var(name) var(descr) var(command) var(args) ...)(
+item(tt(_wanted) [ tt(-C) var(name) ] [ tt(-12VJ) ] var(tag) var(name) var(descr) var(command) var(args) ...)(
In many contexts only one type of matches can be generated but even
then it should be tested if the tag representing those matches is
requested by the user. This function makes that easier.
@@ -2607,6 +2607,9 @@
Unlike tt(_requested), however, tt(_wanted) can not be called without
the var(command). That's because tt(_wanted) also implements the loop
over the tags, not only the one for the labels.
+
+Like tt(_tags) this function supports the tt(-C) option to give a
+different name for the argument context field.
)
findex(_alternative)
item(tt(_alternative) [ tt(-C) var(name) ] var(specs) ...)(
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author