This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update VIRTUAL_ENV_DISABLE_PROMPT value
Following prezto update
- Loading branch information
5c412b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 )
5c412b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
orfalse
. 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..5c412b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
settingtrue
orfalse
in this code by default.Is it equal
unset VIRTUAL_ENV_DISABLE_PROMPT
?