diff --git a/bin/asdf b/bin/asdf index c7485319..a5037def 100755 --- a/bin/asdf +++ b/bin/asdf @@ -26,7 +26,7 @@ find_asdf_cmd() { local asdf_cmd_dir asdf_cmd_dir="$(asdf_dir)/lib/commands" case "$1" in - ('exec' | 'current' | 'env' | 'global' | 'install' | 'latest' | 'list' | 'local' |\ + ('exec' | 'current' | 'env' | 'global' | 'install' | 'latest' | 'local' |\ 'reshim' | 'uninstall' | 'update' | 'where' | 'which' |\ 'export-shell-version') echo "$asdf_cmd_dir/command-$1" 2 diff --git a/help.txt b/help.txt index 1595bfdd..9463a5a1 100644 --- a/help.txt +++ b/help.txt @@ -22,7 +22,7 @@ MANAGE PACKAGES asdf local Set the package local version asdf global Set the package global version asdf list List installed versions of a package - asdf list-all List all versions of a package + asdf list all List all versions of a package UTILS @@ -32,7 +32,3 @@ UTILS asdf shim-versions List on which plugins and versions is command available asdf update Update asdf to the latest stable release asdf update --head Update asdf to the latest on the master branch - - -"Late but latest" --- Rajinikanth diff --git a/lib/commands/command-help b/lib/commands/command-help index 34d1877b..9c1115af 100644 --- a/lib/commands/command-help +++ b/lib/commands/command-help @@ -1,9 +1,36 @@ # -*- sh -*- -help_command () { +asdf_help() { echo "version: $(asdf_version)" echo "" cat "$(asdf_dir)/help.txt" } +asdf_moto() { + cat </dev/null | sed "s#$plugins_path/# asdf #;"'s#/bin/command##g;s#-# #g')" + if test -n "$ext_cmds"; then + echo "$ext_cmds" | cut -d' ' -f 4 | uniq | while read -r plugin; do + echo + echo "PLUGIN $plugin" + echo "$ext_cmds" | grep " asdf $plugin" + done + fi +} + +help_command() { + asdf_help + asdf_extension_cmds + asdf_moto +} + help_command "$@"