clam.dispatch
Members list
Type members
Classlikes
An entrypoint to the application
An entrypoint to the application
When a command is called, it goes through two phases:
- argument parsing (this may alter the available subcommands)
- running an action or subcommand
A command can be in a tree, but it is designed to be callable as a top-level entrypoint. As such, parent args must be stored in a global context, usually the environment.
When a command is called, it will first parse arguments depending on its parameter definitions. Then, depending on the remainder, a subcommand may be called.
Attributes
- action
A function to call with the extracted result
- builtins
Subcommand candidates to call
- extract
A function that is called with the command's arguments, and whose result may be passed to an action if one is defined. The arguments are: (context, result, next), where:
- context: the global (mutable) context. Values may be passed to subcommands by putting them in this context
- result: the getopt parameter result from the pdefs
- next: whether or not a subcommand will be called
- pdefs
The parameter definitions
- Companion:
- object
- Graph
- Supertypes
Attributes
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
A CLI parameter definition.
A CLI parameter definition.
Includes properties for parsing as well as for auxiliary utilities such as help messages and completion.
Attributes
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
- Known subtypes