Fix asdf current - and it was at this point I realised

This commit is contained in:
jthegedus 2018-01-14 17:49:29 +11:00 committed by Trevor Brown
parent b738413949
commit afac39f1fd

View File

@ -16,17 +16,20 @@ plugin_current_command() {
check_for_deprecated_plugin "$plugin_name"
if [ -z "$version" ]; then
echo "No version set for $plugin_name"
printf "No version set for $plugin_name"
exit 1
else
echo "$version (set by $version_file_path)"
printf "%-8s%s" "$version" "(set by" "$version_file_path)"
fi
}
current_command() {
if [ $# -eq 0 ]; then
for plugin in $(plugin_list_command); do
echo "$plugin $(plugin_current_command "$plugin")"
#plugin_list_command returns <name url> pairs, so filter urls
if [[ $plugin != *"http"* ]] ; then
printf "%-15s%s\\n" "$plugin" "$(plugin_current_command "$plugin")"
fi
done
else
local plugin=$1