mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 23:30:08 +00:00
fix(pyenv): quote % in pyenv_prompt_info
This commit is contained in:
parent
5b076eab9b
commit
42afa6e2ea
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue