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: _diff
Date: 11 Feb 2000 11:14:10 +0100 [thread overview]
Message-ID: <mvb4sbgkpvx.fsf@phobos.lrde.epita.fr> (raw)
In-Reply-To: Sven Wischnowsky's message of "Thu, 10 Feb 2000 15:10:01 +0100 (MET)"
>>> "Sven" == Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
Sven> Oliver Kiddle wrote:
>> I object to using
>> non-local variables like _diff_is_gnu and calling 'diff' instead of
>> pulling out the first word on the command-line.
Sven> Well, if we use something like _diff_is_gnu[$words[1]], using a
Sven> non-local variable should be fine, right?
I don't think so, because _diff_options may be called from places where
$words[1] is not the command name, e.g. called from _prcs (maybe _cvs_diff
could call it too).
Hum, looking closer to _prcs, I see there is a problem, if I do
% prcs diff -P zsh -- -u <TAB>
the values of $words when entering the _diff_options functions are
diff -P zsh -- -u
(this begin with diff since $words was shifted in _prcs)
and the -P option is removed from the diff options list, which is wrong.
I'd like this array te be restricted to
-- -u
unfortunately, I don't see how to do that with _arguments.
The _arguments line calling _diff_options reads
'--[introduce diff options]:*:diff options: _diff_options'
I can't use the `*::message:action' syntax here. So I guess
I have to write an intermediate function that shift the $words
array $CURRENT times before calling _diff_options. Or I am missing
some syntaxic sugar in _arguments?
[...]
--
Alexandre Duret-Lutz
next prev parent reply other threads:[~2000-02-11 10:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-10 14:10 Sven Wischnowsky
2000-02-10 14:44 ` Oliver Kiddle
2000-02-11 10:14 ` Alexandre Duret-Lutz [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-11 13:20 Sven Wischnowsky
2000-02-11 19:27 ` Peter Stephenson
2000-02-11 10:48 Sven Wischnowsky
2000-02-11 13:06 ` Alexandre Duret-Lutz
2000-02-10 12:58 Oliver Kiddle
2000-02-10 15:51 ` Bart Schaefer
2000-02-11 15:28 ` Tanaka Akira
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=mvb4sbgkpvx.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).