From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: _complete_help vs. the matcher-list style
Date: Tue, 2 May 2000 11:09:08 +0200 (MET DST) [thread overview]
Message-ID: <200005020909.LAA30591@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sun, 30 Apr 2000 09:50:14 +0000
Bart Schaefer wrote:
> If you have a matcher-list style, using _complete_help causes any completion
> function that uses that style to be called once for each match-spec in the
> style. (I noticed this while working on a variant of _complete_debug.)
>
> I believe this is because _complete_help redefines compadd to always fail.
Which we need to be sure that all completers are used, of course.
> Nevertheless it's a bit of a pain, as no additional context information is
> obtained by trying the other matchers.
Hm, the easy way is to make the zstyle() function defined by
_complete_help return the empty string when used for the matcher-list
style.
But that also reminds me that I've been dreaming about support to
save/set/restore styles, for use by wrapper functions such as
_complete_help. If anyone has any ideas or suggestions for something
like that, I'd like to hear them.
Bye
Sven
Index: Completion/Commands/_complete_help
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Commands/_complete_help,v
retrieving revision 1.4
diff -u -r1.4 _complete_help
--- Completion/Commands/_complete_help 2000/04/12 03:32:51 1.4
+++ Completion/Commands/_complete_help 2000/05/02 09:07:18
@@ -27,7 +27,14 @@
esac
help_styles[${2}${_f}]="${help_styles[${2}${_f}]},${_t} ${3}:${_f}"
fi
- builtin zstyle "$@"
+
+ # No need to call the completers more than once with different match specs.
+
+ if [[ "$3" = matcher-list ]]; then
+ eval "${4}=( '' )"
+ else
+ builtin zstyle "$@"
+ fi
}
_main_complete
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-05-02 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-02 9:09 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-30 9:50 Bart Schaefer
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=200005020909.LAA30591@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).