From: Markus Heidelberg Date: Wed, 28 Oct 2009 09:45:38 +0000 (+0100) Subject: bash completion: difftool accepts the same options as diff X-Git-Tag: v1.6.6-rc0~93 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f7ad96cfaaec3b32458ca69d44c50d1397d11d38;p=git.git bash completion: difftool accepts the same options as diff So complete refs, files after the double-dash and some diff options that make sense for difftool. Signed-off-by: Markus Heidelberg Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 7c7318c43..e3ddecc99 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -958,6 +958,8 @@ __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff _git_difftool () { + __git_has_doubledash && return + local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --tool=*) @@ -965,11 +967,15 @@ _git_difftool () return ;; --*) - __gitcomp "--tool=" + __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex + --base --ours --theirs + --no-renames --diff-filter= --find-copies-harder + --relative --ignore-submodules + --tool=" return ;; esac - COMPREPLY=() + __git_complete_file } __git_fetch_options="