From b336fa098a3c067724eb4c6c86b8b390775b40b3 Mon Sep 17 00:00:00 2001 From: Alex Jurkiewicz Date: Thu, 12 Oct 2023 09:54:35 +0800 Subject: [PATCH] Adjust pyenv content 1. Remove a spurious space in several themes. 2. Add example for POWERLEVEL9K_PYENV_SHOW_ON_COMMAND --- config/p10k-classic.zsh | 5 ++++- config/p10k-lean-8colors.zsh | 5 ++++- config/p10k-lean.zsh | 5 ++++- config/p10k-rainbow.zsh | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 5ea8faec9..ba53753b7 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -992,6 +992,9 @@ typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false # If set to false, hide python version if it's equal to "system". typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + # Show pyenv only when the command you are typing matches one of these strings. + # Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above. + # typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv' # Pyenv segment format. The following parameters are available within the expansion. # @@ -1003,7 +1006,7 @@ # 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}' + 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='⭐' diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 38328c4e4..57dbf123a 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -970,6 +970,9 @@ typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false # If set to false, hide python version if it's equal to "system". typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + # Show pyenv only when the command you are typing matches one of these strings. + # Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above. + # typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv' # Pyenv segment format. The following parameters are available within the expansion. # @@ -981,7 +984,7 @@ # 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}' + 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='⭐' diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 7cb97e90d..d345b5ada 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -966,6 +966,9 @@ typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false # If set to false, hide python version if it's equal to "system". typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + # Show pyenv only when the command you are typing matches one of these strings. + # Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above. + # typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv' # Pyenv segment format. The following parameters are available within the expansion. # @@ -977,7 +980,7 @@ # 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}' + 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='⭐' diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index ab36838f6..afc8cc0c2 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1038,6 +1038,9 @@ typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false # If set to false, hide python version if it's equal to "system". typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + # Show pyenv only when the command you are typing matches one of these strings. + # Tip: You might want to enable POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW above. + # typeset -g POWERLEVEL9K_PYENV_SHOW_ON_COMMAND='py*|pip*|poetry|virtualenv' # Pyenv segment format. The following parameters are available within the expansion. # @@ -1049,7 +1052,7 @@ # 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}' + 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='⭐'