zsh-workers
 help / color / mirror / code / Atom feed
From: Martin von Wittich <martin.von.wittich@iserv.eu>
To: "" <zsh-workers@zsh.org>
Subject: [PATCH] _diff_options doesn't support -w/--ignore-all-space for GNU diff
Date: Thu, 06 Feb 2020 17:05:35 +0100	[thread overview]
Message-ID: <2525ceed25f15f4ef4984593df64bb1f@iserv.iserv.eu> (raw)

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

I'm using GNU diff 3.7 and zsh 5.7.1 as provided by Debian 10.2, and I noticed that zsh's completion doesn't support diffs -w/--ignore-all-space parameter. This is pretty annoying, because it means that it won't complete "new file" in this case:

diff -uw old new<TAB>

It'll think that -uw is "old file", and that "old" is "new file". I don't fully understand the _diff_options completion script, so my change might probably not be completely correct, but the attached patch fixes it for me.

Martin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: _diff_options.patch --]
[-- Type: text/x-diff; name=_diff_options.patch, Size: 467 bytes --]

--- _diff_options	2019-02-05 01:18:01.000000000 +0100
+++ /usr/share/zsh/functions/Completion/Unix/_diff_options	2020-02-06 16:57:25.785300505 +0100
@@ -82,6 +82,7 @@
       '--palette=[specify colors to use]:color:_diff_palette'
       "($of $ouc)--side-by-side[output in two columns]"
       "($of $ouc)-y[output in two columns]"
+      '(-w --ignore-all-space)'{-w,--ignore-all-space}'[ignore all white space]'
     )
   else
     args+=( '!--speed-large-files' )

             reply	other threads:[~2020-02-06 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 16:05 Martin von Wittich [this message]
2020-02-06 19:32 ` dana

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=2525ceed25f15f4ef4984593df64bb1f@iserv.iserv.eu \
    --to=martin.von.wittich@iserv.eu \
    --cc=zsh-workers@zsh.org \
    /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).