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
lib/helpers.bash
Normal file → Executable file
4
lib/helpers.bash
Normal file → Executable file
@@ -11,8 +11,8 @@ BASH_IT_LOAD_PRIORITY_SEPARATOR="---"
|
||||
# To use this in Bash-it for inline replacements with `sed`, use the following syntax:
|
||||
# sed "${BASH_IT_SED_I_PARAMETERS[@]}" -e "..." file
|
||||
BASH_IT_SED_I_PARAMETERS=(-i)
|
||||
case "$(uname)" in
|
||||
Darwin*) BASH_IT_SED_I_PARAMETERS=(-i "")
|
||||
case "$OSTYPE" in
|
||||
'darwin'*) BASH_IT_SED_I_PARAMETERS=(-i "")
|
||||
esac
|
||||
|
||||
function _command_exists ()
|
||||
|
||||
Reference in New Issue
Block a user