diff --git a/prompt.sh b/prompt.sh index 4f3b66b..1cddf22 100755 --- a/prompt.sh +++ b/prompt.sh @@ -30,7 +30,7 @@ __prompt_git() { __prompt_vpn() { [[ -z $PROMPT_VPN_NAME ]] && return - nmcli -f GENERAL.STATE con show "$PROMPT_VPN_NAME" &>/dev/null || return + [[ -n $(nmcli -f GENERAL.STATE con show "$PROMPT_VPN_NAME" &>/dev/null) ]] || return echo -n " → \[\e[38;2;${PROMPT_VPN_COLOR}m\]${PROMPT_VPN_NAME}\[\e[0m\]" }