diff options
author | Markus Heidelberg <markus.heidelberg@web.de> | 2009-10-28 12:45:38 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-28 20:59:40 +0300 |
commit | f7ad96cfaaec3b32458ca69d44c50d1397d11d38 (patch) | |
tree | a8f67c6aa07d6cde6f73c2a4aeaf44f754a8ebd2 | |
parent | 93cf50a412e3ed988cbce07e2ba3a80841d3884b (diff) |
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 <markus.heidelberg@web.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | contrib/completion/git-completion.bash | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 7c7318c436..e3ddecc995 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=" |