Code

Only load .exe suffix'd completions on Cygwin.
authorShawn O. Pearce <spearce@spearce.org>
Sun, 5 Nov 2006 11:20:25 +0000 (06:20 -0500)
committerJunio C Hamano <junkio@cox.net>
Sun, 5 Nov 2006 21:36:30 +0000 (13:36 -0800)
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>
contrib/completion/git-completion.bash

index fdfbf959b79e66be5930b644c6051871bcd4bf63..926638d5ffe4fd7c5c5ca7df9219c52dc639db73 100755 (executable)
@@ -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