summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2006-11-05 06:20:25 -0500
committerLibravatar Junio C Hamano <junkio@cox.net>2006-11-05 13:36:30 -0800
commit76c3eb51ede4619116ef980aa34d087c97c25cbc (patch)
tree66bfdfb40b73d2f70a24c99ba8669b660e6b8195 /contrib
parentAdded missing completions for show-branch and merge-base. (diff)
downloadtgif-76c3eb51ede4619116ef980aa34d087c97c25cbc.tar.xz
Only load .exe suffix'd completions on Cygwin.
The only platform which actually needs to define .exe suffixes as part of its completion set is Cygwin. So don't define them on any other platform. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index fdfbf959b7..926638d5ff 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -350,6 +350,7 @@ complete -o default -o nospace -F _git_log git-whatchanged
# when the user has tab-completed the executable name and consequently
# included the '.exe' suffix.
#
+if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
complete -o default -o nospace -F _git git.exe
complete -o default -F _git_branch git-branch.exe
complete -o default -o nospace -F _git_cat_file git-cat-file.exe
@@ -361,3 +362,4 @@ complete -o default -F _git_merge_base git-merge-base.exe
complete -o default -o nospace -F _git_push git-push.exe
complete -o default -o nospace -F _git_log git-show-branch.exe
complete -o default -o nospace -F _git_log git-whatchanged.exe
+fi