Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _diff_options doesn't support -w/--ignore-all-space for GNU diff
- X-seq: zsh-workers 45388
- From: Martin von Wittich <martin.von.wittich@xxxxxxxx>
- To: "" <zsh-workers@xxxxxxx>
- Subject: [PATCH] _diff_options doesn't support -w/--ignore-all-space for GNU diff
- Date: Thu, 06 Feb 2020 17:05:35 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
--- _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' )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author