Open sgript opened 9 months ago
Do you use venv via pyenv? Could you tell us the version of both pyenv and Oh My Zsh that you’re using? I’m guessing one or the other could be causing this.
Having the same issue.
OS: Ubuntu 22.04.4 LTS x86_64
Kernel: 5.17.0-1020-oem
Shell: zsh 5.8.1
OMZ: master (12cd3b3)
pyenv: pyenv 2.3.25-1-ge1b7e1b5
vscode: 1.87.0
# .zshrc
ZSH_THEME=""
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
# other plugins...
)
source $ZSH/oh-my-zsh.sh
# NOTE: oh-my-zsh overrides the prompt so Pure must be activated after source $ZSH/oh-my-zsh.sh
# Add path of pure repo to /home/.zsh folder
fpath+=($HOME/.zsh/pure)
autoload -U promptinit; promptinit
prompt pure
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Node Version Manager (NVM)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
To reproduce, start a new terminal and this is the visual:
~/path main
(venv) venv ❯
Two observations:
deactivate
followed by . venv/bin/activate
, then (venv)
disappears.zsh
, (venv)
also disappears.There's a workaround by adding this to .zshrc
Warp#2684
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
This will get rid of the preceding venv prompt by disabling the venv prompt shown by pyenv
General information
System report (output of
prompt_pure_system_report
):Other information
I have:
Problem description
I've got double venv showing in my prompt for Python. Previously did not have "(venv)", just "venv ❯" showing
It seems when I start my shell I get the
(venv)
pre-appended (becoming(venv) venv ❯
), but if I runzsh
/ source my zsh shell, it gets rid of it and results in justvenv ❯
as expected. I expect a package update has caused the(venv)
prepending now. So my question was, is it possible to disable the extravenv ❯
from appearing? Ideally however, I preferred just havingvenv ❯
appear, rather than the uncoloured(venv)
.Reproduction steps
(venv)
prepended in front of Pure'svenv ❯
(venv)
My
.zshrc
: