Package for parsing command-line arguments to Julia programs.
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
wrap
function (see [#128][PR128])ArgParseSettingError
for all settings-related errorsconvert
method from AbstractString
@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@warn
)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 return nothing
instead.Dict{String,Any}
, as stated in the docs,
rather than Dict{AbstractString,Any}
.Upgrading from versions 0.2.X to 0.3.X, the following API changes were made, which may break existing code:
eval_arg=true
setting (although this is discuraged).add_arg_table
function has changed, it now takes a Dict
object instead of an @options
opbject, since the dependency on the
Options.jl module was removed. (The @add_arg_table
macro is unchanged
though.)ArgParse.parse_item
can be used to
instruct ArgParse on how to parse custom types. Parse error reporting was
also improved