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: Assorted _arguments arguments
Date: Fri, 12 May 2000 09:35:48 +0200 (MET DST)	[thread overview]
Message-ID: <200005120735.JAA09941@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Fri, 12 May 2000 02:53:02 +0000


Bart Schaefer wrote:

> ...
> 
> I haven't really worked at understanding _argument_sets very much, but:
> 
> As I understand it, _argument_sets only works for fairly simple option
> combinations.  As soon as you start needing ->state and the like, it's
> necessary to revert to using _arguments directly.  Is it possible to
> combine the two in some useful way so that it isn't necessary to give
> up the above convenience in order to do more complex parsing?

The only real problem _argument_sets currently has with `->state'
actions is when there are more than one state returned at the same
time. Especially for actions defined in the common options/args part:
you'll get the state/context more than once in $state and $context
(and just using `typeset -U' doesn't work, because the contexts may be 
different, including the set-name).

However, _argument_sets was mostly written to give us a way to play
with this, test it. The syntax (the `-' to separate sets) was chosen
because `-' currently makes comparguments/_arguments report an invalid 
argument. So... we could try to put the whole functionality of
_argument_sets into _arguments, implement it (mostly) in C. I would
then write it there as we have it in shell code now: as a wrapper
around the existing code. That was the problem that led to the
implementation we have now: changing all of comparguments to support
multiple sets is extremly complicated (and error-prone).

Bye
 Sven


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


             reply	other threads:[~2000-05-12  7:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-12  7:35 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-05-11  8:52 Sven Wischnowsky
2000-05-12  2:53 ` Bart Schaefer
2000-05-09  9:02 Sven Wischnowsky

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=200005120735.JAA09941@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).