[x] I have searched the issues of this repo and believe that this is not a duplicate.
OS version and name: macOS 10.14.6
poetry shell seems to override the prompt completely in a very aggressive way. My prompt currently looks like this
username@host:mydir (gitrepo) [15 stash] $
When I invoke poetry shell the resulting prompt looks like
Spawning shell within .../virtualenvs/omitted
bash-3.2$ . /omitted/bin/activate
(rip-oEcYTxbK-py3.7) bash-3.2$ cd -
I suspect this is because the shell is not spawned as a login shell, hence it does not parse configuration files (e.g. bashrc). This might be a bug or a missing feature. If the second, poetry shell should have an option to spawn a login shell.
I think this is worse than this.
Running poetry shell for bash clears anything defined in .bash_profile, which is where the standard "run once" interactive shell definitions go. Anything setup like development variables, custom prompts all get wiped away.
It will read .bashrc though.
This seems to suggest that current environment variables set in the current shell, might also get blown away.
Note this behavior is different than running activate inside the virtualenv because activate doesn't blow away your shell environment.
Note that pipenv shell doesn't blow away the definitions set by .bash_profile.
Same for me:
Most helpful comment
I think this is worse than this.
Running poetry shell for bash clears anything defined in .bash_profile, which is where the standard "run once" interactive shell definitions go. Anything setup like development variables, custom prompts all get wiped away.
It will read .bashrc though.
This seems to suggest that current environment variables set in the current shell, might also get blown away.
Note this behavior is different than running activate inside the virtualenv because activate doesn't blow away your shell environment.
Note that pipenv shell doesn't blow away the definitions set by .bash_profile.