ArgParse.jl is a package for parsing command-line arguments to Julia programs.
To install the module, use Julia's package manager: start pkg mode by pressing ]
and then enter:
(v1.5) pkg> add ArgParse
The module can then be loaded like any other Julia module:
julia> using ArgParse
- The manual is HERE.
- See also the examples in the examples directory.
- Add options to control the help text formatting (#132)
- Allow defaults that can be converted into the target argument type (#133)
- Fix ambiguity with julia 1.11 new
wrap
function (see #128) - Throw a new
ArgParseSettingError
for all settings-related errors - Fixed some tests
- Fix in @project_version macro (see #107)
- Added a @project_version macro (see #106)
- Faster startup time by disabling optimizations/inference (see #104)
- Fixed the case when using symbol keys, commands are not required, no command is provided
- Try using the constructor for types that don't define a
convert
method fromAbstractString
- Small fixes in docs
- Drop support for Julia versions v0.6/v0.7
- Renamed a few functions and macros (old versions can be used but produce deprecation warnings):
@add_arg_table
→@add_arg_table!
add_arg_table
→add_arg_table!
add_arg_group
→add_arg_group!
set_default_arg_group
→set_default_arg_group!
import_settings
→import_settings!
. The signature of this function has also changed:args_only
is now a keyword argument
- Parsing does not exit julia by default when in interactive mode now
- Added mutually-exclusive and/or required argument groups
- Added command aliases
- Fix a remaining compatibility issue (
@warn
)
- Testing infrastructure update, tiny docs fixes
- Added support for Julia v0.7, dropped support for Julia v0.5.
- Added
exit_after_help
setting to control whether to exit julia after help/version info is displayed (which is still the defult) or to just abort the parsing and returnnothing
instead.
- Added support for Julia v0.6, dropped support for Julia v0.4.
- The default output type is now
Dict{String,Any}
, as stated in the docs, rather thanDict{AbstractString,Any}
. - Added docstrings, moved documentation to Documenter.jl
- Added support for vectors of METAVAR names (see #33)
- Support for Julia v0.3 was dropped.
Upgrading from versions 0.2.X to 0.3.X, the following API changes were made, which may break existing code:
- Option arguments are no longer evaluated by default. This is for security
reasons. Evaluation can be forced on a per-option basis with the
eval_arg=true
setting (although this is discuraged). - The syntax of the
add_arg_table
function has changed, it now takes aDict
object instead of an@options
opbject, since the dependency on the Options.jl module was removed. (The@add_arg_table
macro is unchanged though.)
- Documented that overloading the function
ArgParse.parse_item
can be used to instruct ArgParse on how to parse custom types. Parse error reporting was also improved - Removed dependecy on the Options.jl module
- Enabled precompilation on Julia 0.4