Add Poetry support to virtualenv

Heavily based on #1994.

Integrate Poetry virtualenv detection into the existing virtualenv
segment. For poetry virtualenvs, use the package name as reported by
`poetry version`.
This commit is contained in:
Alex Jurkiewicz 2023-10-12 13:33:59 +08:00
commit e3e5605a61
6 changed files with 51 additions and 15 deletions

View file

@ -93,6 +93,8 @@
# 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