✨ feat(cli): enhance cli subcommand ordering and grouping
- improve subcommand organization for better user experience - implement display_order attribute for logical ordering of subcommands - introduce next_help_heading for grouping subcommands under meaningful titles
This commit is contained in:
committed by
Jeremiah Russell
parent
af9ced8416
commit
1052eeb22e
@@ -30,22 +30,26 @@ struct Cli {
|
|||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
enum SubCmds {
|
enum SubCmds {
|
||||||
/// Configure rules and labels
|
/// Configure rules and labels
|
||||||
#[clap(name = "config")]
|
#[clap(
|
||||||
|
name = "config",
|
||||||
|
display_order = 1,
|
||||||
|
next_help_heading = "Configuration"
|
||||||
|
)]
|
||||||
Config(ConfigCli),
|
Config(ConfigCli),
|
||||||
/// List messages
|
/// List messages
|
||||||
#[clap(name = "message")]
|
#[clap(name = "message", display_order = 3, next_help_heading = "Messages")]
|
||||||
Message(MessageCli),
|
Message(MessageCli),
|
||||||
/// List labels
|
/// List labels
|
||||||
#[clap(name = "label")]
|
#[clap(name = "label", display_order = 2, next_help_heading = "Labels")]
|
||||||
Labels(LabelCli),
|
Labels(LabelCli),
|
||||||
/// Move messages to trash
|
/// Move messages to trash
|
||||||
#[clap(name = "trash")]
|
#[clap(name = "trash", display_order = 4, next_help_heading = "Messages")]
|
||||||
Trash(TrashCli),
|
Trash(TrashCli),
|
||||||
/// Delete messages
|
/// Delete messages
|
||||||
#[clap(name = "delete")]
|
#[clap(name = "delete", display_order = 5, next_help_heading = "Messages")]
|
||||||
Delete(DeleteCli),
|
Delete(DeleteCli),
|
||||||
/// Run the rules from the rules configuration
|
/// Run the rules from the rules configuration
|
||||||
#[clap(name = "run")]
|
#[clap(name = "run", display_order = 6, next_help_heading = "Rule Processing")]
|
||||||
Run(RunCli),
|
Run(RunCli),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user