Commit Graph

12 Commits

Author SHA1 Message Date
Mikael Pettersson
7964864840 getopt: an argument inexactly matching two different but equivalent options is considered a match 2020-03-16 22:49:17 +01:00
Mikael Pettersson
1fd3a7c0b4 getopt: when OptString starts with '-' tag non-options also after '--' 2020-03-14 18:08:39 +01:00
Mikael Pettersson
ecda1ffaad getopt: opt-in support for single-dash options, e.g. ld's -nostdlib 2020-03-12 22:33:05 +01:00
Mikael Pettersson
a83fb418b1 getopt: change per-element parsing to return new state instead of tail-calling parse_argv/5 2020-03-12 22:33:05 +01:00
Mikael Pettersson
4e30e25a89 getopt: factor out duplicated code for non-options 2020-03-12 22:33:05 +01:00
Mikael Pettersson
2a0f15ac52 getopt: throw badarg on invalid LongOpts instead of returning error tuple 2020-03-12 22:33:05 +01:00
Mikael Pettersson
a4d6d2ffff getopt: remove unused parse/2 API function 2019-09-09 17:39:20 +02:00
Mikael Pettersson
887fdf0d93 format_error/1 implementations: remove lists:flatten/1 calls, correct return value spec 2019-08-16 15:06:25 +02:00
Mikael Pettersson
9af4555d3e getopt: add format_error/1, tag error reasons with ?MODULE 2019-08-14 21:24:02 +02:00
Mikael Pettersson
a005109a33 change licence of Erlang bits to the GPL, matching the rest of the project 2018-12-26 17:51:03 +01:00
Mikael Pettersson
ea4861ad33 getopt: correct parsing of options with optional arguments 2018-12-26 13:40:32 +01:00
Mikael Pettersson
5a2f9bb6a2 implement getopt clone for Erlang 2018-12-22 17:40:10 +01:00