Expand description
Facilities for implementing and managing builtins
Structs§
- Registration
- Encapsulates a registration for a built-in command.
Enums§
- Content
Type - Type of help content, typically associated with a built-in command.
Traits§
- Command
- Trait implemented by built-in shell commands.
- Declaration
Command - Trait implemented by built-in shell commands that take specially handled declarations as arguments.
- Simple
Command - A simple command that can be registered as a built-in.
Functions§
- builtin
- Returns a built-in command registration, given an implementation of the
Commandtrait. - decl_
builtin - Returns a built-in command registration, given an implementation of the
DeclarationCommandtrait. Used for select commands that can take parsed declarations as arguments. - parse_
known - This function and the
try_parse_knownexists to deal with the Clap’s limitation of treating--like a regular valuehttps://github.com/clap-rs/clap/issues/5055 - raw_
arg_ builtin - Returns a built-in command registration, given an implementation of the
DeclarationCommandtrait that can be default-constructed. The command implementation is expected to implement clap’sParsertrait solely for help/usage information. Arguments are passed directly to the command viaset_declarations. This is primarily only expected to be used with select builtin commands that wrap other builtins (e.g., “builtin”). - simple_
builtin - Returns a built-in command registration, given an implementation of the
SimpleCommandtrait. - try_
parse_ known - Similar to
parse_knownbut withclap::Parser::try_parse_fromThis function is used to parse arguments in builtins such ascrate::echo::EchoCommand
Type Aliases§
- Command
Content Func - Type of a function to retrieve help content for a built-in command.
- Command
Execute Func - Type of a function implementing a built-in command.