From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: RE: RFD: Zsh styles and OOP ...
Date: Tue, 15 Feb 2000 13:08:40 +0100 (MET) [thread overview]
Message-ID: <200002151208.NAA12625@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Tue, 15 Feb 2000 13:39:17 +0300
Andrej Borsenkow wrote:
> > > This is certainly interesting. Unfortunately it's going to
> > make the whole
> > > thing even more complicated, both for implementation and use.
> > Furthermore,
> > > we really need this to be right in 3.1.7 --- I would be against
> > rewriting
> > > the configuration for completion yet again.
> >
> > You are not alone here...
> >
>
> The only problem is, it will be more and more hard to change anything after
> ZSH is released.
Guess why I'm trying to be as active as possible in this discussion.
> > I may also repeat my suggestion that we can put the context-finding
> > code from _complete and _normal into a separate function. This could
> > then be called at the very beginning (bindable commands,
> > _main_complete). It would at least fill the context/command field of
> > the context name.
>
> It is not a question of missing context bits. The problem is, these bits are
> completely meaningless in some cases. Unless we want to use different
> completers for different commands, it does not help to know, what command is
> being completed.
>
> I just wish, that context names properly reflect there usage :-)
Does this boil down to: if I don't care about the (possibly empty)
value of a certain context field (we currently call them fields in the
context names we have now, you may call them sub-contexts or
whatever), I don't want to have to mention it in the pattern I give?
If so, is it really that irritating to have to use `*' in some
places. And, from the other side, what's the big difference between an
empty and an non-existing field. I mean, ok, without reading the
documentation a context like ':completion:::::' may look weird, but if
you always think about the field-tuple this actually conveys some
meaning, saying that the values for some fields (think of them as
separate sub-contexts now) is not yet known or `there is nothing'.
E.g., if the function-field is empty, this actually says something,
namely that the completion system was called due to a key press, not
from some function.
Oh, and when I said that we can set up at least one more field at the
beginning, this of course (automatically, given the way style lookup
works) means that one can give different completers for different
commands. Which may be useful. And this means that it would make sense
to tell users about that field from the beginning.
All in all (with the change suggested), there would be only one field
-- the argument field -- that would always be empty in context names
used by completers. And here this empty string doesn't tell us
anything interesting. But letting it appear even then has the nice
effect that context names always have the same length.
Unless, of course, we want to change the context stuff completely.
Really completely. Not even using simple strings for context
names. But I need a lot more ideas and suggestions, possibly even
syntax for definition and lookup before I can talk about that. Just
saying that something isn't good and should be done differently isn't
exactly helpful ;-)
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-02-15 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-15 12:08 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-15 10:10 Sven Wischnowsky
2000-02-15 10:39 ` Andrej Borsenkow
2000-02-14 10:50 Andrej Borsenkow
2000-02-14 19:13 ` Peter Stephenson
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=200002151208.NAA12625@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).