From: Felipe Contreras Date: Wed, 28 Oct 2020 02:07:10 +0000 (-0600) Subject: completion: bash: cleanup cygwin check X-Git-Tag: v2.30.0-rc0~105^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8030684beb7af806909c3fa79d3d4017121a753c;p=thirdparty%2Fgit.git completion: bash: cleanup cygwin check Avoid Yoda conditions, and use $OSTYPE. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index ed059f35c3..980ce73b0f 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3499,6 +3499,6 @@ __git_complete gitk __gitk_main # when the user has tab-completed the executable name and consequently # included the '.exe' suffix. # -if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then -__git_complete git.exe __git_main +if [ "$OSTYPE" = cygwin ]; then + __git_complete git.exe __git_main fi