Don't call external uname when $OSTYPE will do (#1911)
* lib/helpers: use `$OSTYPE` instead of `$(uname)` * plugins/osx: use `$OSTYPE` instead of `$(uname)` * plugins/boot2docker: use `$OSTYPE` instead of `$(uname)` * plugins/python: use `$OSTYPE` instead of `$(uname)` * plugins/base: use `$OSTYPE` instead of `$(uname)` Alsö, use `[[` instead of `[` as the former has less insane argument handling being shell syntax rather than a builtin command that must emulate being a real binary * completion/brew: use `$OSTYPE` instead of `$(uname)` * completion/git: use `$OSTYPE` instead of `$(uname)` Alsö, use `[[` instead of `[`. * completion/fabric: use `$OSTYPE` instead of `uname` * theme/demula: use `$OSTYPE` instead of `$(uname)` * theme/rana: use `$OSTYPE` instead of `$(uname)`
This commit is contained in:
4
completion/available/git.completion.bash
Normal file → Executable file
4
completion/available/git.completion.bash
Normal file → Executable file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user