Expand description
Infrastructure for shell built-in commands.
Structs§
- Builtin
Result - Result of executing a built-in command.
- Registration
- Encapsulates a registration for a built-in command.
Enums§
- Content
Type - Type of help content, typically associated with a built-in command.
- Exit
Code - Exit codes for built-in commands.
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. - 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 - 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 as [crate::builtins::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.