Scallop
Internal configuration builder.
Internal configuration builder.
Type members
Classlikes
Types
Value members
Concrete methods
Adds a subbuilder (subcommand) to this builder.
Adds a subbuilder (subcommand) to this builder.
- Value Params
- name
All arguments after this string would be routed to this builder.
Get the value of option. If option is not found, this will throw an exception.
Get the value of option. If option is not found, this will throw an exception.
- Value Params
- name
Name for option.
Add some more arguments to this builder. They are appended to the end of the original list.
Add some more arguments to this builder. They are appended to the end of the original list.
- Value Params
- a
arg list to add
Add banner string to this builder. Banner should describe your program and provide a short summary on it's usage.
Add banner string to this builder. Banner should describe your program and provide a short summary on it's usage.
- Value Params
- b
Banner string, can contain multiple lines. Note this is not formatted to 80 characters!
Get summary of current parser state, hididng values for some of the options. Useful if you log the summary and want to avoid storing sensitive information in the logs (like passwords)
Get summary of current parser state, hididng values for some of the options. Useful if you log the summary and want to avoid storing sensitive information in the logs (like passwords)
- Value Params
- blurred
names of the options that should be hidden.
- Returns
a list of all options in the builder
Traverses the tree of subbuilders, using the provided name.
Traverses the tree of subbuilders, using the provided name.
- Value Params
- name
Names of subcommand names, that lead to the needed builder, separated by \0.
Get the value of option (or trailing arg) as Option.
Get the value of option (or trailing arg) as Option.
- Value Params
- name
Name for option.
Retrieves a list of all supplied options (including options from subbuilders).
Retrieves a list of all supplied options (including options from subbuilders).
Get full help text (with version, banner, option usage and footer)
Get full help text (with version, banner, option usage and footer)
Retrieves the subbuilder object, that matches the name of the subcommand found in input arguments.
Retrieves the subbuilder object, that matches the name of the subcommand found in input arguments.
Retrieves name of the subcommand that was found in input arguments.
Retrieves name of the subcommand that was found in input arguments.
Returns the list of subcommand names, recursively.
Returns the list of subcommand names, recursively.
Get help on options from this builder. The resulting help is carefully formatted to required number of columns (default = 80, change with .setHelpWidth method), and contains info on properties, options and trailing arguments.
Get help on options from this builder. The resulting help is carefully formatted to required number of columns (default = 80, change with .setHelpWidth method), and contains info on properties, options and trailing arguments.
Tests if this option or trailing arg was explicitly provided by argument list (not from default).
Tests if this option or trailing arg was explicitly provided by argument list (not from default).
- Value Params
- name
Identifier of option or trailing arg definition
Print help message (with version, banner, option usage and footer) to stdout.
Print help message (with version, banner, option usage and footer) to stdout.
Explicitly sets the needed width for the help printout.
Explicitly sets the needed width for the help printout.
Get summary of current parser state.
Get summary of current parser state.
Returns a list of all options in the builder, and corresponding values for them.
Verify the builder. Parses arguments, makes sure no definitions clash, no garbage or unknown options are present, and all present arguments are in proper format. It is recommended to call this method before using the results.
Verify the builder. Parses arguments, makes sure no definitions clash, no garbage or unknown options are present, and all present arguments are in proper format. It is recommended to call this method before using the results.
If there is "--help" or "--version" option present, it prints help or version statement and exits.