Commit 4224c2a1 authored by Robby Russell's avatar Robby Russell
Browse files

Merge pull request #3494 from AlexTalker/short-host

Fix echo nothing if $SHORT_HOST doesn't exist.
parents 51e366e5 8cf04ed3
......@@ -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='
......
......@@ -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}
}
......
......@@ -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=''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment