tweaks to make no sandbox show at the appropriate time only.

This commit is contained in:
Ivan Malison 2014-04-08 11:55:55 -07:00
parent 35bf7f00c0
commit 64ead55fe5
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ function sandbox_prompt_info() {
if [ "$YELP_IN_SANDBOX" ];
then
sandbox_string=$sandbox_string"sandbox-$(get_sandbox_identifier)"
elif [ ! -z $(env | grep YELP) ];
elif [ ! -z "$(env | grep yelp | head)" ] && git branch 1>/dev/null 2>/dev/null;
then
sandbox_string="no sandbox"
fi

View File

@ -22,7 +22,7 @@ function git_status_character() {
}
function sandbox_prompt() {
if [ ! -z $(sandbox_prompt_info) ];
if [ ! -z "$(sandbox_prompt_info)" ];
then
echo " %{$FG[239]%}with $(colored_sandbox_string)%{$reset_color%}"
fi