diff options
Diffstat (limited to 'src/rebar.erl')
-rw-r--r-- | src/rebar.erl | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/rebar.erl b/src/rebar.erl index 36114cf..a1b51aa 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -203,10 +203,6 @@ show_info_maybe_halt(O, Opts, F) -> %% commands() -> S = <<" -dialyze Analyze with Dialyzer -build-plt Build Dialyzer PLT -check-plt Check Dialyzer PLT - clean Clean compile Compile sources @@ -278,8 +274,8 @@ filter_flags([Item | Rest], Commands) -> command_names() -> ["build-plt", "check-deps", "check-plt", "clean", "compile", "create", - "create-app", "create-node", "ct", "delete-deps", "dialyze", "doc", - "eunit", "generate", "generate-appups", "generate-upgrade", "get-deps", + "create-app", "create-node", "ct", "delete-deps", "doc", "eunit", + "generate", "generate-appups", "generate-upgrade", "get-deps", "help", "list-templates", "update-deps", "version", "xref"]. unabbreviate_command_names([]) -> @@ -324,17 +320,15 @@ is_command_name_sub_word_candidate(Command, Candidate) -> %% Allow for parts of commands to be abbreviated, i.e. create-app %% can be shortened to "create-a", "c-a" or "c-app" (but not %% "create-" since that would be ambiguous). - CommandSubWords = re:split(Command, "-", [{return, list}]), - CandidateSubWords = re:split(Candidate, "-", [{return, list}]), + ReOpts = [{return, list}], + CommandSubWords = re:split(Command, "-", ReOpts), + CandidateSubWords = re:split(Candidate, "-", ReOpts), is_command_name_sub_word_candidate_aux(CommandSubWords, CandidateSubWords). -is_command_name_sub_word_candidate_aux([CmdSW | CmdSWs], [CandSW | CandSWs]) -> - case lists:prefix(CmdSW, CandSW) of - true -> - is_command_name_sub_word_candidate_aux(CmdSWs, CandSWs); - false -> - false - end; +is_command_name_sub_word_candidate_aux([CmdSW | CmdSWs], + [CandSW | CandSWs]) -> + lists:prefix(CmdSW, CandSW) andalso + is_command_name_sub_word_candidate_aux(CmdSWs, CandSWs); is_command_name_sub_word_candidate_aux([], []) -> true; is_command_name_sub_word_candidate_aux(_CmdSWs, _CandSWs) -> |