zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _diff_options doesn't support -w/--ignore-all-space for GNU diff
@ 2020-02-06 16:05 Martin von Wittich
  2020-02-06 19:32 ` dana
  0 siblings, 1 reply; 2+ messages in thread
From: Martin von Wittich @ 2020-02-06 16:05 UTC (permalink / raw)
  To: zsh-workers

[-- 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' )

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-06 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 16:05 [PATCH] _diff_options doesn't support -w/--ignore-all-space for GNU diff Martin von Wittich
2020-02-06 19:32 ` dana

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).