From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Calling completion function from a non-completion ZLE widget
Date: Tue, 30 May 2000 09:59:08 +0200 (MET DST) [thread overview]
Message-ID: <200005300759.JAA19754@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Tue, 30 May 2000 07:20:18 +0000
Bart Schaefer wrote:
> ...
>
> The best we can do seems to be a bit of defensive programming up front.
> What's a reliable way to determine that the completion system is active?
> (Testing a parameter won't do it, the user could always set another of
> the same name.)
Hm, no parameter? Even if ${(t)compstate} yields `association-local-special'?
We can use the conditions, e.g.:
if [[ -prefix * ]] 2> /dev/null; then
# completion active
fi
Or should we change compadd to return `2' in $? when completion is not
active? Or `1' there, but `2' if no matches are given, so that we
could do
compadd 2> /dev/null
if [[ $? -ne 1 ]]; then
...
fi
? Dunno.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-05-30 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-30 7:59 Sven Wischnowsky [this message]
2000-05-30 15:38 ` Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
2000-05-30 7:20 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=200005300759.JAA19754@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).