{"thread":{"id":"10988","subject":"[PATCH] bash completion: add diff options","startedAt":"2007-11-23T01:11:35Z","lastAt":"2007-11-23T01:11:35Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"60729","messageId":"Pine.LNX.4.64.0711230111110.27959@racer.site","threadId":"10988","inReplyTo":null,"subject":"[PATCH] bash completion: add diff options","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-23T01:11:35Z","receivedAt":"2007-11-23T01:11:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nI use \"git diff\" (the porcelain) really often, and am almost as often\nannoyed that the completions do not know how to complete something simple\nas --cached.  Now they do.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n contrib/completion/git-completion.bash |   14 ++++++++++++++\n 1 files changed, 14 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 599b2fc..58e0e53 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -551,6 +551,20 @@ _git_describe ()\n \n _git_diff ()\n {\n+\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n+\tcase \"$cur\" in\n+\t--*)\n+\t\t__gitcomp \"--cached --stat --numstat --shortstat --summary\n+\t\t\t--patch-with-stat --name-only --name-status --color\n+\t\t\t--no-color --color-words --no-renames --check\n+\t\t\t--full-index --binary --abbrev --diff-filter\n+\t\t\t--find-copies-harder --pickaxe-all --pickaxe-regex\n+\t\t\t--text --ignore-space-at-eol --ignore-space-change\n+\t\t\t--ignore-all-space --exit-code --quiet --ext-diff\n+\t\t\t--no-ext-diff\"\n+\t\treturn\n+\t\t;;\n+\tesac\n \t__git_complete_file\n }\n \n-- \n1.5.3.6.1977.g54d30\n"}]}