Struct shli::completion::Command
source · [−]Expand description
Possible (sub)command displayed in tab completion.
The arguments right from a (sub)command may be flags, arbitrary arguments or even subcommands. They all can be displayed or even tab-completed, when described in this data structure’s attributes.
use shli::Command;
let cmd = Command::new("exit");
Fields
name: String
The name of the command that shall be completed
args: Vec<Argument>
If calling completion after the name, the arguments may be completed
subcommands: Vec<Command>
If calling completion after a subcommand, it may be completed
Implementations
Add a subcommand to this command
use shli::Command;
let cmd = Command::new("config")
.subcommand(Command::new("commit"));