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:
2
themes/demula/demula.theme.bash
Normal file → Executable file
2
themes/demula/demula.theme.bash
Normal file → Executable file
@@ -98,7 +98,7 @@ prompt() {
|
||||
local MOVE_CURSOR_RIGHTMOST='\033[500C'
|
||||
local MOVE_CURSOR_5_LEFT='\033[5D'
|
||||
|
||||
if [ $(uname) = "Linux" ];
|
||||
if [[ "$OSTYPE" = 'linux'* ]]
|
||||
then
|
||||
PS1="${TITLEBAR}${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}
|
||||
$(safe_battery_charge)${RESTORE_CURSOR}\
|
||||
|
||||
2
themes/rana/rana.theme.bash
Normal file → Executable file
2
themes/rana/rana.theme.bash
Normal file → Executable file
@@ -181,7 +181,7 @@ prompt() {
|
||||
local MOVE_CURSOR_RIGHTMOST='\033[500C'
|
||||
local MOVE_CURSOR_5_LEFT='\033[5D'
|
||||
|
||||
if [ $(uname) = "Linux" ];
|
||||
if [[ "$OSTYPE" == 'linux'* ]];
|
||||
then
|
||||
PS1="${TITLEBAR}
|
||||
${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\
|
||||
|
||||
Reference in New Issue
Block a user