|
|
@ -291,13 +291,8 @@ CURRENT_BG='NONE'
|
|
|
|
|
|
|
|
|
|
|
|
# Anaconda Environment
|
|
|
|
# Anaconda Environment
|
|
|
|
prompt_anaconda() {
|
|
|
|
prompt_anaconda() {
|
|
|
|
if $(hash ack 2>/dev/null); then
|
|
|
|
if ! [ -z ${CONDA_ENV_PATH+x} ]; then
|
|
|
|
local active_conda_env=$(where conda | ack -o '(?<=envs/)[\w-]+(?=/bin)')
|
|
|
|
"$1_prompt_segment" "$0" "$2" "green" "black" "($(basename $CONDA_ENV_PATH))" ""
|
|
|
|
else
|
|
|
|
|
|
|
|
local active_conda_env=$(where conda | grep -o -P '(?<=envs/)[\w-]+(?=/bin)')
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -n $active_conda_env ]]; then
|
|
|
|
|
|
|
|
"$1_prompt_segment" "$0" "$2" "green" "black" "($active_conda_env)" ""
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|