[det]argv_options(:Argv,
-Positional, -Options, +ParseOptions)As argv_options/3 in guided
mode, Currently this version allows parsing argument options throwing an
exception rather than calling
halt/1 by passing an
empty list to ParseOptions. ParseOptions:
- on_error(+Goal)
- If Goal is
halt(Code)
, exit with Code. Other
goals are currently not supported.
- options_after_arguments(+Boolean)
- If
false
(default true
), stop parsing after
the first positional argument, returning options that follow this
argument as positional arguments. E.g, -x file -y
results
in positional arguments [file, '-y']
- unknown_option(+Mode)
- One of
error
(default) or pass
. Using pass
,
the option is passed in Positional. Multi-flag short options
may be processed partially. For example, if -v
is defined
and -iv
is in Argv, Positional
receives '-i'
and the option defined with -v
is added to Options.
- To be done
- When passing unknown options we may wish to process multi-flag options
as a whole or not at all rather than passing the unknown flags.