{"thread":{"id":"21400","subject":"[PATCH] bash completion: difftool accepts the same options as diff","startedAt":"2009-10-28T09:45:38Z","lastAt":"2009-10-28T14:32:54Z","messageCount":2,"participants":["Markus Heidelberg","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"126121","messageId":"1256723138-1480-1-git-send-email-markus.heidelberg@web.de","threadId":"21400","inReplyTo":null,"subject":"[PATCH] bash completion: difftool accepts the same options as diff","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-10-28T09:45:38Z","receivedAt":"2009-10-28T09:45:38Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"So complete refs, files after the doubledash and some diff options that\nmake sense for difftool.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n contrib/completion/git-completion.bash |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex d3fec32..45369e2 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -958,6 +958,8 @@ __git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n \n _git_difftool ()\n {\n+\t__git_has_doubledash && return\n+\n \tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n \tcase \"$cur\" in\n \t--tool=*)\n@@ -965,11 +967,15 @@ _git_difftool ()\n \t\treturn\n \t\t;;\n \t--*)\n-\t\t__gitcomp \"--tool=\"\n+\t\t__gitcomp \"--cached --staged --pickaxe-all --pickaxe-regex\n+\t\t\t--base --ours --theirs\n+\t\t\t--no-renames --diff-filter= --find-copies-harder\n+\t\t\t--relative --ignore-submodules\n+\t\t\t--tool=\"\n \t\treturn\n \t\t;;\n \tesac\n-\tCOMPREPLY=()\n+\t__git_complete_file\n }\n \n __git_fetch_options=\"\n-- \n1.6.5.2.86.g61663\n"},{"id":"126144","messageId":"20091028143254.GQ10505@spearce.org","threadId":"21400","inReplyTo":"1256723138-1480-1-git-send-email-markus.heidelberg@web.de","subject":"Re: [PATCH] bash completion: difftool accepts the same options as diff","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-10-28T14:32:54Z","receivedAt":"2009-10-28T14:32:54Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> wrote:\n> So complete refs, files after the doubledash and some diff options that\n> make sense for difftool.\n> \n> Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\n>  contrib/completion/git-completion.bash |   10 ++++++++--\n>  1 files changed, 8 insertions(+), 2 deletions(-)\n\n-- \nShawn.\n"}]}