diff --git a/dotfiles/lib/shellrc/yelp.sh b/dotfiles/lib/shellrc/yelp.sh index 6d3c9efa..8b967dae 100644 --- a/dotfiles/lib/shellrc/yelp.sh +++ b/dotfiles/lib/shellrc/yelp.sh @@ -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 diff --git a/dotfiles/lib/zsh/prompt.sh b/dotfiles/lib/zsh/prompt.sh index f7f6b9a6..391e6ae0 100644 --- a/dotfiles/lib/zsh/prompt.sh +++ b/dotfiles/lib/zsh/prompt.sh @@ -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