From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9986 invoked from network); 11 Feb 2000 10:15:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Feb 2000 10:15:58 -0000 Received: (qmail 18682 invoked by alias); 11 Feb 2000 10:15:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9675 Received: (qmail 18655 invoked from network); 11 Feb 2000 10:15:48 -0000 To: Sven Wischnowsky Cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: _diff References: <200002101410.PAA25260@beta.informatik.hu-berlin.de> X-Attribution: adl From: Alexandre Duret-Lutz Date: 11 Feb 2000 11:14:10 +0100 In-Reply-To: Sven Wischnowsky's message of "Thu, 10 Feb 2000 15:10:01 +0100 (MET)" Message-ID: User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> "Sven" == Sven Wischnowsky 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 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