Browse files


Following prezto update
  • Loading branch information...
josselinauguste committed Nov 17, 2018
1 parent 724781e commit 5c412b4d420a2226cbf8af4ab38c61154df858e4
Showing with 1 addition and 1 deletion.
  1. +1 −1 powerlevel9k.zsh-theme
@@ -1648,7 +1648,7 @@ prompt_vi_mode() {
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n "$virtualenv_path" && "$VIRTUAL_ENV_DISABLE_PROMPT" != true ]]; then
if [[ -n "$virtualenv_path" && -z "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$(basename "$virtualenv_path")" 'PYTHON_ICON'

3 comments on commit 5c412b4


This comment has been minimized.

shengje replied Dec 6, 2018

I try this theme for a while but can not print the prompt virtualenv correctly.
Finally I change the code like this
if [[ -n "$virtualenv_path" && -z "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
need to change into
if [[ -n "$virtualenv_path" && -n "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then

I'm not sure is my own problem or bug, just let anyone who has same problem to know this.
(my system : ubuntu 18.04 LTS with shell OMZ )


This comment has been minimized.


dritter replied Dec 6, 2018

Hi @shengje ,

To be honest, your suggested change does not look right to me. And to be fair, @josselinauguste doesn't look right either. The Variable is named disable_prompt , so it expects a certain value like true or false. Checking the entire variable for (non) zero length does not work if the variable is set to true/false:

As a workaround, if you do unset VIRTUAL_ENV_DISABLE_PROMPT, it should work..


This comment has been minimized.

shengje replied Dec 7, 2018

Hi @dritter ,
Thanks for correcting my suggestion!
Now I knew this workflow of this script.
This correction references by the theme in the original OMZ package.
I found that there is no variable VIRTUAL_ENV_DISABLE_PROMPT setting true or false in this code by default.

Please sign in to comment.