zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: Saving the zle display stuff
Date: Wed, 15 Mar 2000 10:58:40 +0100 (MET)	[thread overview]
Message-ID: <200003150958.KAA15835@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Tue, 14 Mar 2000 19:39:40 +0000


Oliver Kiddle wrote:

> Sven Wischnowsky wrote:
> > 
> > Oliver Kiddle wrote:
> 
> > > I seem to have some fairly long option exclusion lists in some of my
> > > completions so it might also be worth thinking if there are any better
> > > ways of doing the completion when there are separate forms of the
> > > command. I experimented with a few things like using two calls to
> > > _arguments without much success.
> > 
> > Yep. Any suggestions? ;-)
> 
> I've got some ideas but I'm not sure how workable they would be.
> 
> First, I suppose we would need some syntax to divide the arguments to
> _arguments into separate groups. At a simple level, you could say that
> each group defined the options for a separate form of the command and
> use something like '--' to separate the groups. The main additional
> functionality that this would offer over the current situation is that
> you could define separate non-option arguments (*:... or n:...) for each
> group.

`--' is alredy used for the automatic long-option stuff.

> ...
> 
> In summary, this is grouping the arguments and using common exclusion
> lists for the groups and allowing the groups to exclude other whole
> groups. You could easily expand the above to have longer exclusion lists
> and use the current syntax (although you couldn't deal with two -e and
> two * definitions).

The douled -e is indeed a problem. For one, _arguments currently can't 
report multiple actions (and is happy with the first one it finds if
it finds one). That can probably be changed (I'm not exactly sure how
complicated this would be). But of course, this would give us the same 
problem as for _alternative: the ->state actions. _arguments simply
cannot execute more than one of these because it doesn't execute them
at all. Maybe that could be changed to report all states that have to
be used to the caller, but then every function using multiple sets and 
->state has to be able to deal with that (rows of `if's instead of one
`case' or a `case' in a loop).

Hm. Maybe a wrapper (_multi_arguments) that turns these grouping stuff 
into normal _arguments descriptions (as you suggested) and then an
option to _arguments to allow it to deal with multiply given
options. And a way to say which of the multiple descriptions for the
same option is mutually exclusive, of course.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-03-15  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-15  9:58 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-14 14:59 Sven Wischnowsky
2000-03-14 19:39 ` Oliver Kiddle

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=200003150958.KAA15835@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).