mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 08:50:08 +00:00
fix(ys): fix $VIRTUAL_ENV
check if nounset
is enabled (#9915)
This commit is contained in:
parent
59c40eee8e
commit
303ae79712
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ local venv_info='$(virtenv_prompt)'
|
|||
YS_THEME_VIRTUALENV_PROMPT_PREFIX=" %{$fg[green]%}"
|
||||
YS_THEME_VIRTUALENV_PROMPT_SUFFIX=" %{$reset_color%}%"
|
||||
virtenv_prompt() {
|
||||
[[ -n ${VIRTUAL_ENV} ]] || return
|
||||
[[ -n "${VIRTUAL_ENV:-}" ]] || return
|
||||
echo "${YS_THEME_VIRTUALENV_PROMPT_PREFIX}${VIRTUAL_ENV:t}${YS_THEME_VIRTUALENV_PROMPT_SUFFIX}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue