This commit is contained in:
John Pocock 2025-01-20 10:04:47 +01:00 committed by GitHub
commit 94fa0f8e59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -227,6 +227,18 @@ prompt_virtualenv() {
fi
}
# Anaconda: current working conda env
# To replace the conda modification of PS1 do `conda config --set changeps1 False`
# or add 'changeps1: False' to your .condarc file.
prompt_conda() {
local conda_env="$CONDA_DEFAULT_ENV"
if [[ -n $conda_env ]]; then
if [[ -z $CONDA_PROMPT_MODIFIER ]]; then
prompt_segment blue black "conda:$(basename $conda_env)"
fi
fi
}
# Status:
# - was there an error
# - am I root
@ -258,6 +270,7 @@ prompt_aws() {
build_prompt() {
RETVAL=$?
prompt_status
prompt_conda
prompt_virtualenv
prompt_aws
prompt_context