From a79a934f2748cdbe8da06a01126cbbdddf0fa986 Mon Sep 17 00:00:00 2001 From: Alex Jurkiewicz Date: Thu, 12 Oct 2023 13:49:13 +0800 Subject: [PATCH] Remove POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY Added for debugging purposes. --- config/p10k-classic.zsh | 2 -- config/p10k-lean-8colors.zsh | 2 -- config/p10k-lean.zsh | 2 -- config/p10k-pure.zsh | 2 -- config/p10k-rainbow.zsh | 2 -- internal/p10k.zsh | 12 +++++------- 6 files changed, 5 insertions(+), 17 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index eb9b8232..5ea8faec 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -944,8 +944,6 @@ # If set to "false", won't show virtualenv if pyenv is already shown. # If set to "if-different", won't show virtualenv if it's the same as pyenv. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - # Check for virtual environments managed by poetry - typeset -g POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY=true # Separate environment name from Python version only with a space. typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= # Custom icon. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 55a1c221..38328c4e 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -922,8 +922,6 @@ # If set to "false", won't show virtualenv if pyenv is already shown. # If set to "if-different", won't show virtualenv if it's the same as pyenv. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - # Check for virtual environments managed by poetry - typeset -g POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY=true # Separate environment name from Python version only with a space. typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= # Custom icon. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 9327c89c..7cb97e90 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -918,8 +918,6 @@ # If set to "false", won't show virtualenv if pyenv is already shown. # If set to "if-different", won't show virtualenv if it's the same as pyenv. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - # Check for virtual environments managed by poetry - typeset -g POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY=true # Separate environment name from Python version only with a space. typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= # Custom icon. diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index 26cdcaf6..97c1a207 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -93,8 +93,6 @@ # Don't show Python version. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= - # Check for virtual environments managed by poetry - typeset -g POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY=true # Blue current directory. typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index e18e82a4..ab36838f 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -988,8 +988,6 @@ # If set to "false", won't show virtualenv if pyenv is already shown. # If set to "if-different", won't show virtualenv if it's the same as pyenv. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - # Check for virtual environments managed by poetry - typeset -g POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY=true # Separate environment name from Python version only with a space. typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= # Custom icon. diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 5a1cd8f8..d341f772 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4315,13 +4315,11 @@ prompt_virtualenv() { if [[ -n $VIRTUAL_ENV ]]; then n=$(_virtualenv_VIRTUAL_ENV) else - if [[ $POWERLEVEL9K_VIRTUALENV_ENABLE_POETRY == true ]]; then - local start end - _p9k_upglob pyproject.toml - local idx=$? - if (( idx > 0 )); then - n=$(_virtualenv_poetry $idx) - fi + local start end + _p9k_upglob pyproject.toml + local idx=$? + if (( idx > 0 )); then + n=$(_virtualenv_poetry $idx) fi fi msg+="$_POWERLEVEL9K_VIRTUALENV_LEFT_DELIMITER${n//\%/%%}$_POWERLEVEL9K_VIRTUALENV_RIGHT_DELIMITER"