refactor man and completion with clap derive api

This commit is contained in:
Clément DOUIN
2023-12-05 22:38:08 +01:00
parent 7a10a7fc25
commit d2308221d7
22 changed files with 270 additions and 233 deletions
+2 -1
View File
@@ -120,7 +120,8 @@ pub fn matches(m: &ArgMatches) -> Result<Option<Cmd>> {
/// Represents the email subcommands.
pub fn subcmd() -> Command {
Command::new(CMD_MESSAGE)
.about("Manage messages")
.about("Subcommand to manage messages")
.long_about("Subcommand to manage messages like read, write, reply or send")
.aliases(["msg"])
.subcommand_required(true)
.arg_required_else_help(true)
+2 -1
View File
@@ -73,7 +73,8 @@ pub fn matches<'a>(m: &'a ArgMatches) -> Result<Option<Cmd<'a>>> {
pub fn subcmd() -> Command {
Command::new(CMD_TPL)
.alias("tpl")
.about("Manage templates")
.about("Subcommand to manage templates")
.long_about("Subcommand to manage templates like write, reply, send or save")
.subcommand_required(true)
.arg_required_else_help(true)
.subcommand(