zsh-workers
 help / color / mirror / code / Atom feed
From: Tanaka Akira <akr@jaist.ac.jp>
To: Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: Re: PATCH: _diff
Date: 12 Feb 2000 00:28:04 +0900	[thread overview]
Message-ID: <rsqitzvep2z.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: Oliver Kiddle's message of "Thu, 10 Feb 2000 12:58:19 +0000"

In article <38A2B5EB.20014972@u.genie.co.uk>,
  Oliver Kiddle <opk@u.genie.co.uk> writes:

> -	_diff_is_gnu=0;
> -        [[ $(command diff -v </dev/null) == *GNU* ]] && _diff_is_gnu=1
> +	_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 -<TAB>
-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
+        [[ $(command diff -v </dev/null 2>/dev/null) == *GNU* ]] && _diff_is_gnu=1
 }
 
 if (( _diff_is_gnu ))
-- 
Tanaka Akira


  parent reply	other threads:[~2000-02-11 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-10 12:58 Oliver Kiddle
2000-02-10 15:51 ` Bart Schaefer
2000-02-11 15:28 ` Tanaka Akira [this message]
2000-02-10 14:10 Sven Wischnowsky
2000-02-10 14:44 ` Oliver Kiddle
2000-02-11 10:14 ` Alexandre Duret-Lutz
2000-02-11 10:48 Sven Wischnowsky
2000-02-11 13:06 ` Alexandre Duret-Lutz
2000-02-11 13:20 Sven Wischnowsky
2000-02-11 19:27 ` Peter Stephenson

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=rsqitzvep2z.fsf@crane.jaist.ac.jp \
    --to=akr@jaist.ac.jp \
    --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).