mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[zsh] display the current pyenv version in the prompt
This commit is contained in:
parent
ed93c816f9
commit
60f8ca3788
1 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=false
|
||||
|
||||
# Escapes `%` in all arguments by replacing it with `%%`. Escaping is needed so
|
||||
# that untrusted input (e.g. git branch names) doesn't affect prompt rendering.
|
||||
prompt_escape() {
|
||||
|
@ -102,6 +100,11 @@ PROMPT+='$(prompt_vcs_info 2>/dev/null)'
|
|||
|
||||
# Python's virtualenv
|
||||
PROMPT+='${VIRTUAL_ENV:+" %F{blue}venv:%F{magenta}${VIRTUAL_ENV:t}%f"}'
|
||||
VIRTUAL_ENV_DISABLE_PROMPT=true
|
||||
|
||||
# pyenv
|
||||
PROMPT+='${PYENV_VERSION:+" %F{blue}pyenv:%F{magenta}${PYENV_VERSION:t}%f"}'
|
||||
PYENV_VIRTUAL_ENV_DISABLE_PROMPT=true
|
||||
|
||||
PROMPT+=' '
|
||||
|
||||
|
|
Loading…
Reference in a new issue