- pythoninfo=`asdf current python | sed 's/ */ /g' | cut -d ' ' -f 2`
- if [[ -z "$VIRTUAL_ENV" ]]; then
- venv="default"
- else
- venv="${VIRTUAL_ENV##*/}"
- fi
- echo "%{%F{green}%}py%{%F{black}%} ${pythoninfo}@${venv}"
+ pythoninfo=`cat ~/.tool-versions | rg python | cut -d ' ' -f 2`
+ pythoninfo=${ASDF_PYTHON_VERSION:-$pythoninfo}
+ venv="${VIRTUAL_ENV##*/}"
+ echo "%{%F{green}%}py%{%F{black}%} ${pythoninfo:-no}@${venv:-default}"