fix(pyenv): quote % in `pyenv_prompt_info`

parent 5b076eab
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment