Merge pull request #3494 from AlexTalker/short-host

Fix echo nothing if $SHORT_HOST doesn't exist.
This commit is contained in:
Robby Russell 2015-06-05 08:07:12 -07:00
commit 4224c2a1af
3 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
}
PROMPT='

View File

@ -21,7 +21,7 @@ function prompt_char {
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
}

View File

@ -17,7 +17,7 @@ function prompt_char {
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
}
local ruby_env=''