2019-11-27 01:24:29 -07:00
|
|
|
# -*- sh -*-
|
|
|
|
|
2017-08-24 19:29:23 -07:00
|
|
|
plugin_list_all_command() {
|
|
|
|
initialize_or_update_repository
|
|
|
|
|
2018-01-13 23:08:21 -07:00
|
|
|
local plugins_index_path
|
2018-06-10 01:54:39 -07:00
|
|
|
plugins_index_path="$(asdf_data_dir)/repository/plugins"
|
2018-01-13 20:37:48 -07:00
|
|
|
|
2018-01-13 23:08:21 -07:00
|
|
|
local plugins_local_path
|
|
|
|
plugins_local_path="$(get_plugin_path)"
|
|
|
|
|
2019-11-29 09:15:38 -07:00
|
|
|
if ls "$plugins_index_path" &>/dev/null; then
|
2018-06-16 12:04:38 -07:00
|
|
|
for index_plugin in "$plugins_index_path"/*; do
|
2018-01-13 23:08:21 -07:00
|
|
|
index_plugin_name=$(basename "$index_plugin")
|
|
|
|
source_url=$(get_plugin_source_url "$index_plugin_name")
|
|
|
|
installed_flag=""
|
|
|
|
|
2018-10-27 12:05:02 -07:00
|
|
|
[[ -d "${plugins_local_path}/${index_plugin_name}" ]] && installed_flag='*'
|
2018-01-13 23:08:21 -07:00
|
|
|
|
|
|
|
printf "%-15s %-1s%s\\n" "$index_plugin_name" "$installed_flag" "$source_url"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
printf "%s%s\\n" "error: index of plugins not found at " "$plugins_index_path"
|
|
|
|
fi
|
2017-08-24 19:29:23 -07:00
|
|
|
}
|
2019-11-27 01:24:29 -07:00
|
|
|
|
|
|
|
plugin_list_all_command "$@"
|