]> git.r.bdr.sh - rbdr/dotfiles/commitdiff
Show shell version of asdf shims
authorRuben Beltran del Rio <redacted>
Wed, 14 Jul 2021 12:28:36 +0000 (14:28 +0200)
committerRuben Beltran del Rio <redacted>
Wed, 14 Jul 2021 12:28:36 +0000 (14:28 +0200)
zsh/modules/prompt.zsh

index a3051788869a112d3bdc88941f0dceb91aface45..0ab1e0d4aff6fdd7b74be73cdcc9dfc6ac7ce752 100644 (file)
@@ -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}"
 }