aboutsummaryrefslogtreecommitdiff
path: root/config/p10k-rainbow.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-05-25 08:31:19 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-05-25 08:31:19 +0300
commit644488afcc2e12657c325539015402e914abf694 (patch)
tree238909c5b0534ed2a85b6a49c2efe48a23a208d0 /config/p10k-rainbow.zsh
parent45eeb08fc39f87127cfd8b15e07718fc8c89fb75 (diff)
change the default anaconda format in config templates
Also document how to configure it. See #762.
Diffstat (limited to 'config/p10k-rainbow.zsh')
-rw-r--r--config/p10k-rainbow.zsh30
1 files changed, 26 insertions, 4 deletions
diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh
index 61555798..ce16ddae 100644
--- a/config/p10k-rainbow.zsh
+++ b/config/p10k-rainbow.zsh
@@ -892,10 +892,32 @@
# Anaconda environment color.
# typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0
# typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4
- # Don't show Python version next to the anaconda environment name.
- typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false
- # Separate environment name from Python version only with a space.
- typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER=
+
+ # Anaconda segment format. The following parameters are available within the expansion.
+ #
+ # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment.
+ # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment.
+ # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below).
+ # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version).
+ #
+ # CONDA_PROMPT_MODIFIER can be configured with the following command:
+ #
+ # conda config --set env_prompt '({default_env}) '
+ #
+ # The last argument is a Python format string that can use the following variables:
+ #
+ # - prefix The same as CONDA_PREFIX.
+ # - default_env The same as CONDA_DEFAULT_ENV.
+ # - name The last segment of CONDA_PREFIX.
+ # - stacked_env Comma-separated list of names in the environment stack. The first element is
+ # always the same as default_env.
+ #
+ # 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#\(}%\) }'
+
# Custom icon.
# typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'