diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2017-01-27 12:33:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 12:33:09 -0800 |
commit | abff9dfff34e04bd23b1f178eadee4d8770de9a9 (patch) | |
tree | 4f4669caa10cf1a676decf995927a359dffc4636 /manpages/commands | |
parent | dfd11b7ae3b81e3c553c9607cd8af27b473f5f63 (diff) | |
parent | 004c808e97f84211b3099ee26f33d6a51295d28b (diff) |
Merge pull request #1451 from ferd/manpages
Add manpage for rebar3
Diffstat (limited to 'manpages/commands')
-rw-r--r-- | manpages/commands | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/manpages/commands b/manpages/commands new file mode 100644 index 0000000..b4db50a --- /dev/null +++ b/manpages/commands @@ -0,0 +1,25 @@ +f(), +P = application:get_env(rebar, providers, []), +S = lists:foldl(fun(P, S) -> {ok, S2} = P:init(S), S2 end, rebar_state:new(), P), +PS = rebar_state:providers(S), +DP = lists:keysort(2,providers:get_providers_by_namespace(default, PS)), +f(Str), +Str = [begin + Name = element(2,Pn), + Desc = element(8,Pn), + Opts = element(10,Pn), + OptShort = [case {Short,Long} of + {undefined,undefined} -> ""; + {undefined,_} -> ["[\\fI--",Long,"\\fR] "]; + {_,undefined} -> ["[\\fI-",Short,"\\fR] "]; + {_,_} -> ["[\\fI-",Short,"\\fR|\\fI--",Long,"\\fR] "] + end || {_,Short,Long,_,_Desc} <- Opts], + OptLong = [case {Short,Long} of + {undefined,undefined} -> ""; + {_,undefined} -> [".IP\n\\fI-",Short,"\\fR: ", Desc, "\n"]; + {_,_} -> [".IP\n\\fI--",Long,"\\fR: ", Desc, "\n"] + end || {_,Short,Long,_,Desc} <- Opts], + [".TP\n", + "\\fB", atom_to_list(element(2,Pn)), "\\fR ", OptShort, "\n", + Desc, "\n", OptLong] end || Pn <- DP, element(5,Pn) == true], +file:write_file("commands.out", Str). |