From 69d3650958ce03d666f433792444290b7b2ffe5d Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sat, 22 May 2021 12:09:13 +0200 Subject: hide python version in pyenv in lean/classic/rainbow if the rest of the content starts with it (#1376) --- config/p10k-lean-8colors.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config/p10k-lean-8colors.zsh') diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 5d944328..6cce4418 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -921,10 +921,10 @@ # # The default format has the following logic: # - # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not - # empty and unequal to $P9K_CONTENT. - # 2. Otherwise display just "$P9K_CONTENT". - typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' + # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or + # starts with "$P9K_PYENV_PYTHON_VERSION/". + # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' # Custom icon. # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' -- cgit v1.2.3