summaryrefslogtreecommitdiff
path: root/plugins/pyenv
diff options
context:
space:
mode:
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