Add conda environment info to terminal prompt
The method suggested in the comment from darthbith works very well. The variable $CONDA_DEFAULT_ENV
is exactly what I was looking for:
>>> source activate myEnv>>> echo $CONDA_DEFAULT_ENVmyEnv
To add to the answer by A.Wenn, this is what I added to my custom prompt
PS1=""# Add conda environment to promptif [ ! -z "$CONDA_DEFAULT_ENV" ]then PS1+="($CONDA_DEFAULT_ENV) "fi