asdf/lib/commands/list.sh
Victor Borja d1f0b64c2f Remove shims on uninstall or plugin-remove
- Remove plugin shims when last version is uninstalled.
- Remove shims on plugin-remove

When the latest version of a tool is uninstalled,
Remove the plugin shims (marked with metadata at #122)

Also found lots of missing tests and added them.

Closes #67
2016-12-15 06:05:23 -06:00

16 lines
298 B
Bash

list_command() {
local plugin_name=$1
check_if_plugin_exists $plugin_name
local versions=$(list_installed_versions $plugin_name)
if [ -n "${versions}" ]; then
for version in $versions; do
echo $version
done
else
display_error 'No versions installed'
exit 1
fi
}