python.zsh to get the current python version
This commit is contained in:
parent
e273cf004e
commit
f6d4e6980c
7
lib/python.zsh
Normal file
7
lib/python.zsh
Normal file
@ -0,0 +1,7 @@
|
||||
# get the python version
|
||||
function python_prompt_info() {
|
||||
local python_prompt
|
||||
python_prompt=$(python -c 'import platform; print(platform.python_version())')
|
||||
[[ "${python_prompt}x" == "x" ]] && return
|
||||
echo "${ZSH_THEME_PYTHON_PROMPT_PREFIX}${python_prompt}${ZSH_THEME_PYTHON_PROMPT_SUFFIX}"
|
||||
}
|
Loading…
Reference in New Issue
Block a user