aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-05-22 15:10:58 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-05-22 15:10:58 +0300
commit3ca1477bd88371c5767e1d9cf4964f622dacac64 (patch)
tree83cb9000de59b9cade790640dc25e9ab63dc588d /powerlevel9k.zsh-theme
parentdc6fdf52b7a17935b70c5cba5a116b7277029dd3 (diff)
cleanup
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 3 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2f7eee3b..cb55bf5c 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -356,11 +356,9 @@ right_prompt_segment() {
set_default POWERLEVEL9K_ANACONDA_LEFT_DELIMITER "("
set_default POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER ")"
prompt_anaconda() {
- # Depending on the conda version, either might be set. This
- # variant works even if both are set.
- local path=$CONDA_ENV_PATH$CONDA_PREFIX
- if [[ -n $path ]]; then
- local msg="$POWERLEVEL9K_ANACONDA_LEFT_DELIMITER${${path:t}//\%/%%}$POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER"
+ local p=${CONDA_PREFIX:-$CONDA_ENV_PATH}
+ if [[ -n $p ]]; then
+ local msg="$POWERLEVEL9K_ANACONDA_LEFT_DELIMITER${${p:t}//\%/%%}$POWERLEVEL9K_ANACONDA_RIGHT_DELIMITER"
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" 'PYTHON_ICON' 0 '' "$msg"
fi
}