From: Ruben Beltran del Rio Date: Wed, 14 Jul 2021 12:28:36 +0000 (+0200) Subject: Show shell version of asdf shims X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/commitdiff_plain/d5c4a1fd1996e4ca0df22f323077423924cf0252?ds=inline;hp=40cd14f7baeb0eeba7e54518cdf218a3f9d6f4c6 Show shell version of asdf shims --- diff --git a/zsh/modules/prompt.zsh b/zsh/modules/prompt.zsh index a305178..0ab1e0d 100644 --- a/zsh/modules/prompt.zsh +++ b/zsh/modules/prompt.zsh @@ -23,17 +23,20 @@ function env_info { function python_info { 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}" } function ruby_info { rubyinfo=`cat ~/.tool-versions | rg ruby | cut -d ' ' -f 2` + rubyinfo=${ASDF_RUBY_VERSION:-$rubyinfo} echo "%{%F{red}%}rb%{%F{black}%} ${rubyinfo:-no}" } function node_info { nodeinfo=`cat ~/.tool-versions | rg nodejs | cut -d ' ' -f 2` + nodeinfo=${ASDF_NODEJS_VERSION:-$nodeinfo} echo "%{%F{yellow}%}js%{%F{black}%} ${nodeinfo:-no}" }