Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Many missing options for git-diff zsh completion



Hi,

git-diff has a lot more options that the latest _git file has.

Here's a patch that adds them (feel free to remove a few of them if
you do not believe they're common enough, but the list seems fine as
it is).

Please, Cc me in your replies, I'm not a list subscriber.

Thanks,

-- 
Matthieu

--- Completion/Unix/_git    2007-08-03 12:50:05 +0000
+++ Completion/Unix/_git    2007-08-03 12:50:15 +0000
@@ -22,17 +22,39 @@
 
 # TODO: -s and --diff-filter are undocumented
 diff_args=(
+  '--abbrev-[Instead of showing the full object name, show only handful hexdigits prefix.]: :_guard "[[\:digit\:]]#" number'
+  '--binary[In addition to --full-index, output "binary diff" that can be applied with "git apply".]'
+  '(-c --cached)'{-c,--cached}'[show cached files in the output]'
+  '--color-words[Show colored word diff, i.e. color words which have changed.]'
+  '--color[Show colored diff.]'
   '--diff-filter=-[filter to apply to diff]'
   '--find-copies-harder[try harder to find copies]'
   '--name-only[show only names of changed files]'
   '--name-status[show only names and status of changed files]'
+  '--no-color[Turn off colored diff, even when the configuration file gives the default to color output.]'
+  '--no-renames[Turn off rename detection, even when the configuration file gives the default to do so.]'
+  '--numstat[Similar to --stat, but shows numbers in decimal notation and pathname without abbreviation.]'
+  '--patch-with-raw[Synonym for "-p --raw".]'
+  '--patch-with-stat[Synonym for "-p --stat".]'
   '--pickaxe-all[when -S finds a change, show all changes in that changeset]'
+  '--pickaxe-regex[Make the <string> not a plain string but an extended POSIX regex to match.]'
+  '--raw[Generate the raw format.]'
+  '--stat[Generate a diffstat.]'
+  '--summary[Output a condensed summary of extended header information such as creations, renames and mode changes.]'
+  '--text[Treat all files as text.]'
+  '(-1 --base)'{-1,--base}'[Diff against the base version]'
+  '(-2 --base)'{-2,--ours}'[Diff against our branch version]'
+  '(-3 --base)'{-3,--theirs}'[Diff against their branch version]'
+  '-0[omit diff output for unmerged entries and just show "Unmerged".]'
+  '-a[Shorthand for "--text".]'
+  '--full-index[Instead of the first handful characters, show full object name of pre- and post-image blob on the "index" line when generating a patch format output.]'
   '-B-[break complete rewrite changes into pairs of given size]: :_guard "[[\:digit\:]]#" size'
   '-C-[detect copies as well as renames with given score]: :_guard "[[\:digit\:]]#" size'
   '-l-[number of rename/copy targets to run]: :_guard "[[\:digit\:]]#" number'
   '-M-[detect renames with given score]: :_guard "[[\:digit\:]]#" size'
   '-O-[output patch in the order of glob-pattern lines in given file]:file:_files'
   '-p[generate diff in patch format]'
+  '-q[Remain silent even on nonexistent files]'
   '-R[do a reverse diff]'
   '-S-[look for differences that contain the given string]:string'
   '-s[do not produce any output]'




Messages sorted by: Reverse Date, Date, Thread, Author