From: Alexandre Duret-Lutz <duret_g@epita.fr>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: _arguments questions
Date: 04 Apr 2000 17:59:56 +0200 [thread overview]
Message-ID: <mvbbt3p7t6r.fsf@phobos.lrde.epita.fr> (raw)
In-Reply-To: Sven Wischnowsky's message of "Tue, 4 Apr 2000 14:54:22 +0200 (MET DST)"
>>> "Sven" == Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
Sven> Alexandre Duret-Lutz wrote:
[...]
>> 1) is there a simplier way to nest `_arguments' ?
Sven> I don't see any. Sorry. Adding more syntactic sugar to the
Sven> _argument specs to support this doesn't seem worth it unless we put
Sven> it into the <action>. Then it's quite simple (making _arguments
Sven> insert the dummy, probably using the option name for it).
Isn't the `*pattern::message' spec quite the same ?
The `*' or
the pattern may also be separated from the
message by two or three colons. With two
colons the words special array and the CUR
RENT special parameter are modified to refer
only to the words after the option (with two
colons)
What we want here is that `words' and `CURRENT' refer to the
words after the option, *including the option*.
Why not a four colons separator ?
_arguments -a -b '-c:*::::blah: _arguments -c -d -e'
Horrible !
Sven> Should we?
I would find this helpfull, since it prevent from writting intermediate
functions (and since _argument is *the* easy way to write completion
functions, it should better nest without requiring the user to dig the
completion system).
Another idea: Isn't there a way to make _arguments detect whether it has
been nested or not ? (I don't know, maybe when the <argument> part
of the context is already set ?). Of course this solve only the
_arguments nesting problem, not the more general "words and CURRENT
include the current option" behaviour.
[...]
--
Alexandre Duret-Lutz
next prev parent reply other threads:[~2000-04-04 16:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-04 12:54 Sven Wischnowsky
2000-04-04 15:59 ` Alexandre Duret-Lutz [this message]
2000-04-05 8:11 Sven Wischnowsky
2000-04-05 9:28 ` Alexandre Duret-Lutz
2000-04-05 9:43 Sven Wischnowsky
2000-04-05 12:03 Sven Wischnowsky
2000-04-05 13:01 ` 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=mvbbt3p7t6r.fsf@phobos.lrde.epita.fr \
--to=duret_g@epita.fr \
--cc=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).