Open flowln opened 11 months ago
I'm running into the same issue. A workaround is to define your own shell prompt using basename $CONDA_PREFIX
(rather than $CONDA_DEFAULT_ENV
, which is the variable usually used).
E.g. in Zsh, without a shell theme, you can add this to .zshrc
:
show_virtual_env() {
if [[ -n "$CONDA_DEFAULT_ENV" ]]; then
echo "($(basename $CONDA_PREFIX)) "
fi
}
PS1='$(show_virtual_env)'$PS1
With a theme that supports conda/mamba environments, you can fish around for its usage of $CONDA_DEFAULT_ENV
and modify it to basename $CONDA_PREFIX
.
Troubleshooting docs
How did you install Mamba?
Micromamba
Search tried in issue tracker
dot,cut,prompt
Latest version of Mamba
Tried in Conda?
I didn't try
Describe your issue
When an environment is active in a shell session, it shows up in that shell's prompt. However, when that environments name contains a dot character, it gets cut of.
For instance, here I have an environment called
pyside2_5.13
, which when active, shows up like that:Fish:
Bash:
Possibly caused by this use of
.stem()
, though it's only a guess of mine: https://github.com/mamba-org/mamba/blob/b3b6cd6d07f8badf49f7f746e624a23d024baba8/libmamba/src/core/activation.cpp#L199mamba info / micromamba info
Logs
No response
environment.yml
No response
~/.condarc
No response