2015-05-17 00:46:56 -07:00
|
|
|
list_command() {
|
2015-05-26 23:46:17 -07:00
|
|
|
local plugin_name=$1
|
|
|
|
local plugin_path=$(get_plugin_path $plugin_name)
|
2016-07-05 16:19:15 -07:00
|
|
|
check_if_plugin_exists $plugin_name
|
2015-05-07 22:58:07 -07:00
|
|
|
|
2015-05-26 23:46:17 -07:00
|
|
|
local plugin_installs_path=$(asdf_dir)/installs/${plugin_name}
|
2015-05-11 09:20:28 -07:00
|
|
|
|
2015-05-29 09:20:32 -07:00
|
|
|
if [ -d $plugin_installs_path ]; then
|
2015-05-17 00:46:56 -07:00
|
|
|
#TODO check if dir is empty and show no-installed-versions msg
|
2015-05-29 09:20:32 -07:00
|
|
|
for install in ${plugin_installs_path}/*/; do
|
2015-05-17 00:46:56 -07:00
|
|
|
echo "$(basename $install)"
|
|
|
|
done
|
|
|
|
else
|
2015-05-18 23:47:00 -07:00
|
|
|
echo 'Oohes nooes ~! No versions installed'
|
2015-05-17 00:46:56 -07:00
|
|
|
fi
|
|
|
|
}
|