From 5a6b551eb51853c2297d74bac2c9e9c14a2d4409 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Fri, 19 Jun 2015 21:14:38 -0500 Subject: print help for namespaces --- src/rebar_prv_do.erl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/rebar_prv_do.erl') diff --git a/src/rebar_prv_do.erl b/src/rebar_prv_do.erl index 35e85c2..f850135 100644 --- a/src/rebar_prv_do.erl +++ b/src/rebar_prv_do.erl @@ -33,8 +33,16 @@ init(State) -> -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. do(State) -> - Tasks = rebar_utils:args_to_tasks(rebar_state:command_args(State)), - do_tasks(Tasks, State). + case rebar_utils:args_to_tasks(rebar_state:command_args(State)) of + [] -> + AllProviders = rebar_state:providers(State), + Namespace = rebar_state:namespace(State), + Providers = providers:get_providers_by_namespace(Namespace, AllProviders), + providers:help(Providers), + {ok, State}; + Tasks -> + do_tasks(Tasks, State) + end. do_tasks([], State) -> {ok, State}; -- cgit v1.1