From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _diff (new), _prcs (upgrade)
Date: Mon, 31 Jan 2000 10:09:53 +0100 (MET) [thread overview]
Message-ID: <200001310909.KAA28126@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Alexandre Duret-Lutz's message of 28 Jan 2000 17:24:14 +0100
Alexandre Duret-Lutz wrote:
> ...
>
> Sven> I suggested that to enable completion functions to make it as you
> Sven> described in 9453: if we are completing for the command, call it
> Sven> without a `command', otherwise with it. And that can't be decided in
> Sven> _call.
>
> I must be missing something. Can't $curcontext be used?
> I am thinking about something like this:
>
> #
> _call () {
> if [[ $curcontext == *:$1: ]]
> then
> $1 #(A)
> else
> command $1 #(B)
> fi
> }
>
> _f() {
> _call foo
> }
>
> compdef _f foo bar
>
>
> seems to run either (A) or (B) wheter I complete after foo or bar.
Hm, for forcing the test to use only command names, this would be
`::${1}:'. Maybe. I'm trying to think of a case where this would fail,
but I can't find one just now...
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-01-31 9:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-31 9:09 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-01-28 15:11 Sven Wischnowsky
2000-01-28 16:24 ` Alexandre Duret-Lutz
2000-01-28 10:25 Sven Wischnowsky
2000-01-28 15:04 ` Alexandre Duret-Lutz
2000-01-28 8:26 Sven Wischnowsky
2000-01-28 9:49 ` Alexandre Duret-Lutz
2000-01-27 16:08 Sven Wischnowsky
2000-01-27 17:21 ` Alexandre Duret-Lutz
2000-01-29 8:49 ` Alexandre Duret-Lutz
2000-01-27 14:52 Alexandre Duret-Lutz
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=200001310909.KAA28126@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).