I would like to customize my terminal prompt. Normally when a conda environment is activated the name of the environment is prepended to the PS1 string. I would like to customize this a bit more but have not been able to figure it out.
If I add changeps1: false
to my .condarc
file the terminal prompt is not modified when I activate a new environment. I can then modify the environment variable in my .bash_profile
for example:
PS1+="\[${cyan}\]<$(basename $CONDA_DEFAULT_ENV)> ";
This returns the name of the environment colored how I would like surrounded by carrots, however this only works after I run source .bash_profile
activating the environment has no effect, which is not unexpected.
My question is how to I update the prompt when activating the environment, or is there a better way of go about this?
This is related to this question
And this example profile However those do not directly address the issue that I am running into of the prompt not changing when activating environments