object
command_line_options
Command line options parsing predicates. Uses object-based option specifications with the command_line_option category.
logtalk_load(command_line_options(loader))static, context_switching_callsPublic predicates
parse/4
Parses the arguments AppArguments according to the option objects OptionObjects using default parsing options.
staticparse(OptionObjects,AppArguments,Options,PositionalArguments)parse(+list(object),+list(atom),-list,-list(atom)) - one_or_errorOptionObjects is a variable, a partial list, or contains an option object definition with an insufficiently instantiated value:instantiation_errorOptionObjects is neither a variable nor a list of valid object identifiers:type_error(list(object),OptionObjects)name/1 predicate:existence_error(predicate,name/1)type_error(Type,Term)domain_error(Domain,Term)domain_error(unique_key,Name)domain_error(unique_short_flag,ShortFlag)domain_error(unique_long_flag,LongFlag)AppArguments is a variable or a partial list:instantiation_errorAppArguments is neither a variable nor a list of atoms:type_error(list(atom),AppArguments)existence_error(command_line_option,Argument)type_error(flag_value,Type)-f=value syntax:syntax_error(disallowed: <shortflag>=<value>)parse/5
Parses the arguments AppArguments according to the option objects OptionObjects and the parsing options ParseOptions. Options is a list of parsed options as Name(Value) terms by default (or Func(Name,Value) when the output_functor(Func) parse option is used). PositionalArguments are the remaining non-dashed arguments. ParseOptions include output_functor(Func), duplicated_flags(Keep) (one of keepfirst, keeplast, keepall; default keeplast), and allow_empty_flag_spec(Bool) (default true).
staticparse(OptionObjects,AppArguments,Options,PositionalArguments,ParseOptions)parse(+list(object),+list(atom),-list,-list(atom),+list) - one_or_errorParseOptions is a variable, a partial list, or contains a variable option:instantiation_errorParseOptions is neither a variable nor a list:type_error(list,ParseOptions)ParseOptions is neither a variable nor a compound term:type_error(compound,Option)ParseOptions is a compound term but not a valid option:domain_error(option,Option)OptionObjects is a variable, a partial list, or contains an option object definition with an insufficiently instantiated value:instantiation_errorOptionObjects is neither a variable nor a list of valid object identifiers:type_error(list(object),OptionObjects)name/1 predicate:existence_error(predicate,name/1)type_error(Type,Term)domain_error(Domain,Term)domain_error(unique_key,Name)domain_error(unique_short_flag,ShortFlag)domain_error(unique_long_flag,LongFlag)domain_error(non_empty_flag_spec,Name)AppArguments is a variable or a partial list:instantiation_errorAppArguments is neither a variable nor a list of atoms:type_error(list(atom),AppArguments)existence_error(command_line_option,Argument)type_error(flag_value,Type)-f=value syntax:syntax_error(disallowed: <shortflag>=<value>)help/2
Synthesizes a help text Help as an atom from the option objects OptionObjects using default help options.
statichelp(OptionObjects,Help)help(+list(object),-atom) - one_or_errorOptionObjects is a variable, a partial list, or contains an option object definition with an insufficiently instantiated value:instantiation_errorOptionObjects is neither a variable nor a list of valid object identifiers:type_error(list(object),OptionObjects)name/1 predicate:existence_error(predicate,name/1)type_error(Type,Term)domain_error(Domain,Term)domain_error(unique_key,Name)domain_error(unique_short_flag,ShortFlag)domain_error(unique_long_flag,LongFlag)help/3
Synthesizes a help text Help as an atom from the option objects OptionObjects using the given HelpOptions. HelpOptions include line_width(Width) (default 80), min_help_width(Width) (default 40), break_long_flags(Boolean) (default false), suppress_empty_meta(Boolean) (default true), and allow_empty_flag_spec(Bool) (default true).
statichelp(OptionObjects,Help,HelpOptions)help(+list(object),-atom,+list) - one_or_errorHelpOptions is a variable, a partial list, or contains a variable option:instantiation_errorHelpOptions is neither a variable nor a list:type_error(list,HelpOptions)HelpOptions is neither a variable nor a compound term:type_error(compound,Option)HelpOptions is a compound term but not a valid option:domain_error(option,Option)OptionObjects is a variable, a partial list, or contains an option object definition with an insufficiently instantiated value:instantiation_errorOptionObjects is neither a variable nor a list of valid object identifiers:type_error(list(object),OptionObjects)name/1 predicate:existence_error(predicate,name/1)type_error(Type,Term)domain_error(Domain,Term)domain_error(unique_key,Name)domain_error(unique_short_flag,ShortFlag)domain_error(unique_long_flag,LongFlag)domain_error(non_empty_flag_spec,Name)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)
See also