What is the use case? Amos King Binary Noggin
> On Dec 22, 2016, at 20:11, Chris Keele <d...@chriskeele.com> wrote: > > Currently only single-letter aliases are allowed. Is this intentional or > would the capacity to alias, for instance, option "foo" as "bar" be a welcome > PR? > >> On Sunday, February 21, 2016 at 4:27:20 AM UTC-8, José Valim wrote: >> Yes, improvements to the action parser will be really welcome. Feel free to >> expand on your proposals here and send PRs. For example, :count could be >> done in the existing :switches configuration. I would also be ok with >> support -vn and the like. >> >> >> >> José Valim >> www.plataformatec.com.br >> Skype: jv.ptec >> Founder and Director of R&D >> >>> On Sun, Feb 21, 2016 at 1:14 PM, derek <den...@gmail.com> wrote: >>> 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, >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "elixir-lang-core" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to elixir-lang-co...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elixir-lang-core/CAJctwx4P4260r0WiMD7pDScReiqwc5vg88MufVHm9hyV6mpvRA%40mail.gmail.com. >>> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/0363554a-3df7-4e8a-bf5a-82a044321142%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/2EB2B51E-591B-4D05-A2F8-D1800842D24C%40binarynoggin.com. For more options, visit https://groups.google.com/d/optout.