aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/prompt_adam3_setup
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2022-11-23 12:41:45 +0100
committerDennis Eriksen <d@ennis.no>2022-11-23 12:41:45 +0100
commitd50efb342b4b8198bda0d8fec2eeb7408dbb4a97 (patch)
tree2f0e3a0d50bfc7c9c0212ece281cb640975349d6 /prompt_adam3_setup
parentWe need to initialize colors before we can use $reset_color (diff)
downloadadam3-d50efb342b4b8198bda0d8fec2eeb7408dbb4a97.tar.gz
check if variable is set in a proper way
Diffstat (limited to 'prompt_adam3_setup')
-rw-r--r--prompt_adam3_setup2
1 files changed, 1 insertions, 1 deletions
diff --git a/prompt_adam3_setup b/prompt_adam3_setup
index 8ae8477..f04ea3c 100644
--- a/prompt_adam3_setup
+++ b/prompt_adam3_setup
@@ -90,7 +90,7 @@ prompt_adam3_precmd () {
PS1+="%(?..[%{$fg[red]%}%?%{$reset_color%}] )"
PS1+="${promptchar} %b%f%k"
- [ ${VIRTUAL_ENV} ] && PS1="%F{208}($(basename ${VIRTUAL_ENV}))%f ${PS1}"
+ (( ${+VIRTUAL_ENV} )) && PS1="%F{208}($(basename ${VIRTUAL_ENV}))%f ${PS1}"
PS2="${PS1}%_> %b%f%k"
PS3="${PS1}?# %b%f%k"
}