MichaelAquilina / zsh-autoswitch-virtualenv

🐍 ZSH plugin to automatically switch python virtualenvs (including pipenv and poetry) as you move between directories
GNU General Public License v3.0
507 stars 80 forks source link

when switching between different venvs the $PS1 configuration is lost #147

Open omersi opened 3 years ago

omersi commented 3 years ago

Issue Details

when I open a new terminal window the $PS1 format is

%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%}
$ 

when I cd to a different directory with a different .venv, the $PS1 is changed automatically to

%m%#

Operating System (uname -a)

Linux imubit-omer 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

zsh version (zsh --version)

zsh 5.8 (x86_64-ubuntu-linux-gnu)

autoswitch-virtualenv version

echo "$AUTOSWITCH_VERSION" 3.1.1

How is zsh-autoswitch-virtualenv installed?

Steps to reproduce the issue

gist link to your zshrc

  1. open a new terminal with existing virtualenv
  2. change dir to a different venv.
MichaelAquilina commented 3 years ago

Hi @omersi. This seems very likely to be due to something subtle in your zshrc because I cant reproduce it. Would you mind posting a gist link to your zshrc? Ideally the zshrc would be reduced down to a minimal set of lines that can still reproduce the issue as it will make it more likely I'll be able to help you

MichaelAquilina commented 3 years ago

@omersi I've deleted your post because you mistakenly posted an API_KEY. I highly suggest you change that API Key because despite deleting this post for you it may still be picked up by someone else.

When you're done, please remove any secrets in the file and then repost the zshrc :)

omersi commented 3 years ago

oh boy... I thought I removed them all... thanks for noticing it.

rnc commented 3 years ago

@omersi I've deleted your post because you mistakenly posted an API_KEY. I highly suggest you change that API Key because despite deleting this post for you it may still be picked up by someone else.

When you're done, please remove any secrets in the file and then repost the zshrc :)

@omersi @MichaelAquilina For reference, as anyone watching the repo gets emails (like I do), I have a copy of the entire thing :-( Not only are there multiple API keys in there but also username/passwords so I suggest you change those as well (and the password, at 8 characters long is far too short - you should aim for e.g. 32 characters. https://xkcd.com/936/ is always a good read :-) )

omersi commented 3 years ago

ALL TOKENS WHERE CHANGED.