Module

OptionParser

Changes by version

Elixir 1.19.0

· 2 changes

Enhancement Tool: Elixir

Support the :regex type

Enhancement Tool: Elixir

Enhance parsing error to display available options

Elixir 1.15.0

· 1 change

Enhancement Tool: Elixir

Support :return_separator option

Elixir 1.13.0

· 2 changes

Enhancement Tool: Elixir

Add "did you mean?" suggestions to OptionParser.ParseError messages

Bugfix Tool: Elixir

Validate switch types/modifiers early on to give more precise feedback

Elixir 1.12.0

· 1 change

Bugfix Tool: Elixir

Properly parse when numbers follow-up aliases, for example, -ab3 is now parsed as -a -b 3

Elixir 1.7.0

· 1 change

Enhancement Tool: Elixir

Deprecate dynamic option parser mode that depended on atoms to be previously loaded and therefore behaved inconsistently

Elixir 1.4.2

· 1 change

Bugfix Tool: Elixir

Add :allow_nonexistent_atoms to support unsafe behaviour prior to v1.4

Elixir 1.4.0

· 3 changes

Enhancement Tool: Elixir

Expand multi-letter aliases in OptionParser

Bugfix Tool: Elixir

Support options in OptionParser.to_argv/2 to ensure :count switches are correctly encoded

Enhancement Tool: Elixir

Deprecate aliases with multiple letters, such as -abc

Elixir 1.3.0

· 3 changes

Enhancement Tool: Elixir

Add support for :count switch type

Enhancement Tool: Elixir

Add parse!/2 and parse_head!/2 that raise OptionParser.ParseError in case of errors

Bugfix Tool: Elixir

Allow OptionParser to parse negative numbers

Elixir 0.14.3

· 2 changes

Enhancement Tool: Elixir

Add OptionParser.split/1 that splits a string into argv

Enhancement Tool: Elixir

--no-SWITCH are only allowed for declared booleans switches

Elixir 0.14.1

· 1 change

Enhancement Tool: Elixir

Do not allow underscores in option names

Elixir 0.13.3

· 5 changes

Enhancement Tool: Elixir

Add :strict option that only parses known switches

Enhancement Tool: Elixir

Add next/2 useful for manual parsing of options

Enhancement Tool: Elixir

Parse - as a plain argument

Enhancement Tool: Elixir

-- is always removed from argument list on parse/2 and when it is the leading entry on parse_head/2

Enhancement Tool: Elixir

Errors on parsing returns the switch and value as binaries (unparsed)

Elixir 0.13.0

· 1 change

Enhancement Tool: Elixir

Do not recognize undefined aliases as switches

Elixir 0.10.2

· 1 change

Enhancement Tool: Elixir

parse and parse_head now returns a tuple with three elements instead of two

Elixir 0.10.1

· 4 changes

Enhancement Tool: Elixir

Do not add boolean flags to the end result if they were not given

Enhancement Tool: Elixir

Do not parse non-boolean flags as booleans when true or false are given

Enhancement Tool: Elixir

Ensure :keep and :integer|:float can be given together as options

Enhancement Tool: Elixir

Ensure --no-flag sets :flag to false when :flag is a registered boolean switch