summaryrefslogtreecommitdiff
path: root/config/p10k-lean.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-06-09 22:33:10 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-06-09 22:33:10 +0300
commite3f582f246840279abf6a75b78cb9b2316e96a71 (patch)
tree237495f48ea1ce6280891fde3aa44c81bb98b4d7 /config/p10k-lean.zsh
parentc6e599ddd50607342ad79b21e8387e8ca6afaa30 (diff)
survive people explicitly disabling conda prompt and then expecting to see it
Diffstat (limited to 'config/p10k-lean.zsh')
-rw-r--r--config/p10k-lean.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh
index db562f0c..ba4f4727 100644
--- a/config/p10k-lean.zsh
+++ b/config/p10k-lean.zsh
@@ -856,8 +856,9 @@
# Note: '({default_env}) ' is the default value of env_prompt.
#
# The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER
- # without the leading '(' or the trailing ') '.
- typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}'
+ # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former
+ # is empty.
+ typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
# Custom icon.
# typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'