Only load .exe suffix'd completions on Cygwin.
[gitweb.git] / 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