Add support for options without a '-' prefix as required by rebar.

Boolean options without an argument are now considered true.
This commit is contained in:
Juan Jose Comellas
2009-12-30 20:12:54 -03:00
parent a59893e9b9
commit 400a7b7cf9
4 changed files with 122 additions and 15 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ test() ->
test(CmdLine) ->
OptSpecList = option_spec(),
OptSpecList = option_spec_list(),
io:format("For command line: ~p~n"
"getopt:parse/2 returns:~n~n", [CmdLine]),
@@ -31,7 +31,7 @@ test(CmdLine) ->
end.
option_spec() ->
option_spec_list() ->
CurrentUser = os:getenv("USER"),
[
%% {Name, ShortOpt, LongOpt, ArgSpec, HelpMsg}