1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

Adapting to newer conda version

This commit is contained in:
Lion Krischer 2016-07-26 11:39:00 +02:00
parent fb211bc04c
commit 97e5684e52
No known key found for this signature in database
GPG key ID: A956F4D0E363F79D

View file

@ -291,14 +291,17 @@ CURRENT_BG='NONE'
# Anaconda Environment
prompt_anaconda() {
if ! [ -z ${CONDA_ENV_PATH+x} ]; then
# Depending on the conda version, either might be set. This
# variant works even if both are set.
_path=$CONDA_ENV_PATH$CONDA_PREFIX
if ! [ -z "$_path" ]; then
# config - can be overwritten in users' zshrc file.
defined POWERLEVEL9K_ANACONDA_BG_COLOR || POWERLEVEL9K_ANACONDA_BG_COLOR=green
defined POWERLEVEL9K_ANACONDA_FG_COLOR || POWERLEVEL9K_ANACONDA_FG_COLOR=black
defined POWERLEVEL9K_ANACONDA_PREFIX || POWERLEVEL9K_ANACONDA_PREFIX=""
defined POWERLEVEL9K_ANACONDA_LEFT_DELIMITER || POWERLEVEL9K_ANACONDA_LEFT_DELIMITER="("
defined POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER || POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER=")"
"$1_prompt_segment" "$0" "$2" "$POWERLEVEL9K_ANACONDA_BG_COLOR" "$POWERLEVEL9K_ANACONDA_FG_COLOR" "$POWERLEVEL9K_ANACONDA_PREFIX$POWERLEVEL9K_ANACONDA_LEFT_DELIMITER$(basename $CONDA_ENV_PATH)$POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER" ""
"$1_prompt_segment" "$0" "$2" "$POWERLEVEL9K_ANACONDA_BG_COLOR" "$POWERLEVEL9K_ANACONDA_FG_COLOR" "$POWERLEVEL9K_ANACONDA_PREFIX$POWERLEVEL9K_ANACONDA_LEFT_DELIMITER$(basename $_path)$POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER" ""
fi
}