summaryrefslogtreecommitdiff
path: root/plugins/pyenv
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
committerTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
commitcae9a2b797649379e865e6bd73bc67e294e4ac77 (patch)
tree481419eff4bc761c3ca516704427394193473419 /plugins/pyenv
parent49edbf438ed690c76e6b2af80368c59404cf0167 (diff)
parent3427da4057dbe302933a7b5b19b4e23bfb9d0969 (diff)
downloadzsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.gz
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.bz2
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/pyenv')
-rw-r--r--plugins/pyenv/pyenv.plugin.zsh6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh
index 39897ed16..ebb1a708a 100644
--- a/plugins/pyenv/pyenv.plugin.zsh
+++ b/plugins/pyenv/pyenv.plugin.zsh
@@ -83,12 +83,14 @@ if [[ $FOUND_PYENV -eq 1 ]]; then
fi
function pyenv_prompt_info() {
- echo "$(pyenv version-name)"
+ local version="$(pyenv version-name)"
+ echo "${version:gs/%/%%}"
}
else
# Fall back to system python
function pyenv_prompt_info() {
- echo "system: $(python -V 2>&1 | cut -f 2 -d ' ')"
+ local version="$(python -V 2>&1 | cut -d' ' -f2)"
+ echo "system: ${version:gs/%/%%}"
}
fi