From 59477c1cf8fe25bbdbfea9d9aae05bb6450ad6e8 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 8 Aug 2021 22:01:09 -0400 Subject: [PATCH] completion/git: use `$OSTYPE` instead of `$(uname)` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alsö, use `[[` instead of `[`. --- completion/available/git.completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 completion/available/git.completion.bash diff --git a/completion/available/git.completion.bash b/completion/available/git.completion.bash old mode 100644 new mode 100755 index 0020ad1b..b9bb1bb6 --- a/completion/available/git.completion.bash +++ b/completion/available/git.completion.bash @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Only operate on MacOS since there are no linux paths -if [[ "$(uname -s)" != 'Darwin' ]] ; then +if [[ "$OSTYPE" != 'darwin'* ]] ; then _log_warning "unsupported operating system - only 'Darwin' is supported" return 0 fi @@ -24,7 +24,7 @@ _git_bash_completion_paths=( # Load the first completion file found for _comp_path in "${_git_bash_completion_paths[@]}" ; do - if [ -r "$_comp_path" ] ; then + if [[ -r "$_comp_path" ]] ; then _git_bash_completion_found=true source "$_comp_path" break