Hi, I'm a new in Erlang/Elixir with somewhat good Python background,
trying to write some small shell utils in Elixir exs script and am
surprised the OptionParser is limited and totally missing in Erlang
standard lib, I read somewhat rebar code and it's using the
`jcomellas/getopt` [3] solution, but I prefer a in lib solution,
Problems with current Elixir OptionParser:
1. it doesn't support combine switches, like "-vn" should be treated
same as "-v -n" if both are not requiring an argument;
2. I need to count behaviour like the Python argparser
`action="count"`; it will be useful to support "--verbose" or "-vvv"
to mean increased verbosity
parser.add_argument("-v", "--verbosity", action="count",
help="increase output verbosity")
[1]
http://elixir-lang.org/docs/master/elixir/OptionParser.html
[2]
https://github.com/elixir-lang/elixir/blob/master/lib/elixir/lib/option_parser.ex
[3]
https://github.com/jcomellas/getopt
[4]
https://docs.python.org/2/howto/argparse.html
I'm trying to improve OptionParser, have some local changes in
option_parser.ex, basically I hope it can be as powerful as Python
argparse module [4]; would like to see here if you have some more
ideas,
Thanks,