From 42afa6e2ea663431ae2ff0a4aae8e57ce175eb4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 26 Dec 2021 19:32:52 +0100 Subject: [PATCH] fix(pyenv): quote % in `pyenv_prompt_info` --- plugins/pyenv/pyenv.plugin.zsh | 6 ++++-- 1 file 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