A zsh prompt for asdf users that displays information about your current tool versions.
The plugin will by default stay quiet when asdf tool versions are at your global settings.
If you are in a folder affected by a .tool-versions file or have set a $ASDF_*_VERSION
it will list the changed versions. Here, I have tweaked versions of python and nodejs:

You can embellish with details on versions and version resolution with the $ZSH_THEME_ASDF_PROMPT_* environment variables:

See section on environment variables further down to learn about the options.
Currently only really tested with oh-my-zsh.
Run
git clone https://github.com/CurryEleison/zsh-asdf-prompt.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-asdf-promptto install the plugin into your custom folder. Activate the plugin in ~/.zshrc:
plugins=( [plugins...] zsh-asdf-prompt)Add the prompt info in your theme with $(asdf_prompt_info). E.g.
PROMPT='%n@%m $(asdf_prompt_info)${(s:/:)PWD/#$HOME/~}%(!.#.>) '
ZSH_THEME_ASDF_PROMPT_PREFIX="%{$fg_bold[magenta]%}{"
ZSH_THEME_ASDF_PROMPT_POSTFIX="}%{$reset_color%} "
ZSH_THEME_ASDF_PROMPT_VERSION_RESOLUTION="COMPACT"ZSH_THEME_ASDF_PROMPT_PREFIX: Prompt prefix. Default to {ZSH_THEME_ASDF_PROMPT_POSTFIX: Prompt postfix. Default to }ZSH_THEME_ASDF_PROMPT_FILTER: Tools to show in prompt.COMPACT,USERorALL. Default toCOMPACTALLshows all asdf toolsUSERshows all that are not usingsystemversionCOMPACTshows tools that are not system and not the default version for the user as defined by~/.tool-versions
ZSH_THEME_ASDF_PROMPT_VERSION_DETAIL: Version detail.MINOR,MAJORorPATCHMINOR: Show major + minor version. Like "python: 3.10, nodejs: 17.4"MAJOR: Show major version. Like "python: 3, nodejs: 17"PATCH: Include patch version. Like "python: 3.10.1, nodejs: 17.4.0"
ZSH_THEME_ASDF_PROMPT_VERSION_RESOLUTION: Show how version was resolved.COMPACTorNONE. Default isNONENONE: Omit version resolution infoCOMPACT: Show howasdfresolved versions- "$" is from
ASDF_<TOOLNAME>_VERSIONenvironment variables - "~" from
.tool-versionsin home dir - "." from
.tool-versionsin current dir - "/" from
.tool-versionsin other parent dir
- "$" is from