-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to remove Conda virtual environment name from Pure prompt #545
Comments
I'm running with |
@mattingram0 this is actually working as intended. Since Pure is Conda-aware, the user should set If you wish to disable virtualenv display, you can do so by setting You can see #440 for the original discussion regarding this. |
Thanks for the suggestion, but unfortunately this didn't work.
Hi mafredi, thanks for the suggestion also and the link to that discussion. Apologies for raising this as an 'issue' in the first place if this is the intended behaviour. Unfortunately setting |
@mattingram0 you're right, I misremembered this. We don't have a way to turn off Conda env display at the moment and there are multiple issues with that:
This is what I can recall from the last time I researched Conda, anyway. Open to new ideas for solving this though because forcing the virtualenv display is definitely not ideal. |
Hi again @mafredi, I've done a bit more digging and I think I might have come up with a solution to this. It seems that the |
@mattingram0 it would be an ok approach, but for that to work we would need an alternative way to tell Conda not to modify the prompt when Pure manages it. Last time I dug through the source of Conda, I could not find anything like that. This is where we're at:
For 1) we currently rely on 2). We're telling Conda, don't touch PS1, but tell us your environment and we'll display it. If we were to rely on 2) for deciding wether or not to display the environment, we would have no way to achieve 1). |
Hi, I just stumbled across Pure while setting up a new machine with zsh, and then I wanted to check if it worked with conda (maybe a heads-up in the REDME?) so somehow I stumbled into this issue and here we are... I remember having the same trouble with the conda prompt modification before, when I wanted to make a custom prompt. As @mafredri said, the CONDA_PROMPT_MODIFIER is not reliable for people who want to customize rather than just remove the conda env hint. However, this answer on SO led me to the @mattingram0 As a naive and hackish workaround, you could try setting |
I stumbled across this issue today, and after trying all of the mentioned possible fixes and following stackoverflow threads to no avail, I found a maybe-solution that probably breaks things that I'm unaware of, but it's working for me at the moment. In the pure code it just checks if the |
General information
It seems that the Pure prompt does not respect the changeps1: False setting in my ~/.condarc. When not using the Pure prompt the virtual environment name is hidden as expected.
System report (output of
prompt_pure_system_report
):''
❯
1.10.3
export VIRTUAL_ENV_DISABLE_PROMPT=12
typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f %}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '
I have:
Problem description
I wish to hide the current Conda environment from the second line of the Pure prompt. Adding changeps1: False to my ~/.condarc has no effect when using Pure.
Reproduction steps
My
~/.zshrc
with Pure deactivated:Showing the configuration is set to False, and activating Conda:
My
~/.zshrc
with Pure activated:Showing the configuration is set to False, and activating Conda:
Thanks in advance for any help anyone is able to give. I believe it may have something to do with
export VIRTUAL_ENV_DISABLE_PROMPT=12
.The text was updated successfully, but these errors were encountered: