From 31884abdfb5ffd4f75441e1e3da52f3f1d1e8d32 Mon Sep 17 00:00:00 2001 From: botp Date: Sun, 12 Jul 2020 18:58:51 +0800 Subject: [PATCH] updated to pass wflow checks eg thru lint etc --- lib/commands/command-list.bash | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/commands/command-list.bash b/lib/commands/command-list.bash index 55e074ad..9e9ccd43 100644 --- a/lib/commands/command-list.bash +++ b/lib/commands/command-list.bash @@ -24,11 +24,20 @@ list_command() { display_installed_versions() { local versions - versions=$(list_installed_versions "$1") - + local plugin + local cver + local flag + + plugin=$1 + versions=$(list_installed_versions "$plugin") if [ -n "${versions}" ]; then + cver=$(asdf current "$plugin" | cut -f 1 -d " ") for version in $versions; do - echo " $version" + flag=" " + if [[ "$version" == "$cver" ]]; then + flag=" *" + fi + echo "${flag}$version" done else display_error 'No versions installed'