From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13948 invoked from network); 11 Feb 2000 15:28:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Feb 2000 15:28:14 -0000 Received: (qmail 6996 invoked by alias); 11 Feb 2000 15:28:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9683 Received: (qmail 6987 invoked from network); 11 Feb 2000 15:28:07 -0000 To: Zsh workers Subject: Re: PATCH: _diff References: <38A2B5EB.20014972@u.genie.co.uk> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 12 Feb 2000 00:28:04 +0900 In-Reply-To: Oliver Kiddle's message of "Thu, 10 Feb 2000 12:58:19 +0000" Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article <38A2B5EB.20014972@u.genie.co.uk>, Oliver Kiddle writes: > - _diff_is_gnu=0; > - [[ $(command diff -v + _diff_is_gnu=0 > + [[ $(command diff -v >/dev/null 2>&1) == *GNU* ]] && > _diff_is_gnu=1 Since this (and Bart's equivalent) makes always _diff_is_gnu 0, _diff_options completes always non-GNUish options as: Z(2):akr@is27e1u11% Src/zsh -f is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst is27e1u11% diff -v diff - GNU diffutils version 2.7 is27e1u11% diff - -b -- skip trailing white spaces -c -- output a context diff -e -- output an ed script -f -- output a reversed ed script -r -- recursively compare subdirectories So, following patch should be applied instead of 9654/9667. Index: Completion/User/_diff_options =================================================================== RCS file: /projects/zsh/zsh/Completion/User/_diff_options,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 _diff_options --- Completion/User/_diff_options 2000/01/27 20:09:32 1.1.1.2 +++ Completion/User/_diff_options 2000/02/11 15:22:10 @@ -4,7 +4,7 @@ (( $+_diff_is_gnu )) || { _diff_is_gnu=0; - [[ $(command diff -v /dev/null) == *GNU* ]] && _diff_is_gnu=1 } if (( _diff_is_gnu )) -- Tanaka Akira