summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-17 21:42:12 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-17 21:42:12 -0700
commitbd15ef078afac3f0f147e815d3b85d6d2a48dd1a (patch)
treeb009b23ff8114f1c50e2dff0d664d8d7926d0472 /contrib/completion
parent2d430c713372fc21f9acf1d8b745e7f4fbbe336c (diff)
parent47d65924a69576bd9f3254f7055de6b37a359596 (diff)
downloadgit-bd15ef078afac3f0f147e815d3b85d6d2a48dd1a.tar.gz
Merge branch 'da/difftool'
* da/difftool: mergetool--lib: simplify API usage by removing more global variables Fix misspelled mergetool.keepBackup difftool/mergetool: refactor commands to use git-mergetool--lib mergetool: use $( ... ) instead of `backticks` bash completion: add git-difftool difftool: add support for a difftool.prompt config variable difftool: add various git-difftool tests difftool: move 'git-difftool' out of contrib difftool/mergetool: add diffuse as merge and diff tool difftool: add a -y shortcut for --no-prompt difftool: use perl built-ins when testing for msys difftool: remove the backup file feature difftool: remove merge options for opendiff, tkdiff, kdiff3 and xxdiff git-mergetool: add new merge tool TortoiseMerge git-mergetool/difftool: make (g)vimdiff workable under Windows doc/merge-config: list ecmerge as a built-in merge tool
Diffstat (limited to 'contrib/completion')
-rwxr-xr-xcontrib/completion/git-completion.bash26
1 files changed, 22 insertions, 4 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index c1c879821d..1a90cb87f5 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -910,6 +910,26 @@ _git_diff ()
__git_complete_file
}
+__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
+ tkdiff vimdiff gvimdiff xxdiff
+"
+
+_git_difftool ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --tool=*)
+ __gitcomp "$__git_mergetools_common kompare" "" "${cur##--tool=}"
+ return
+ ;;
+ --*)
+ __gitcomp "--tool="
+ return
+ ;;
+ esac
+ COMPREPLY=()
+}
+
__git_fetch_options="
--quiet --verbose --append --upload-pack --force --keep --depth=
--tags --no-tags
@@ -1172,10 +1192,7 @@ _git_mergetool ()
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--tool=*)
- __gitcomp "
- kdiff3 tkdiff meld xxdiff emerge
- vimdiff gvimdiff ecmerge opendiff
- " "" "${cur##--tool=}"
+ __gitcomp "$__git_mergetools_common tortoisemerge" "" "${cur##--tool=}"
return
;;
--*)
@@ -1901,6 +1918,7 @@ _git ()
config) _git_config ;;
describe) _git_describe ;;
diff) _git_diff ;;
+ difftool) _git_difftool ;;
fetch) _git_fetch ;;
format-patch) _git_format_patch ;;
fsck) _git_fsck ;;