mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 05:07:55 +08:00
refactor man and completion with clap derive api
This commit is contained in:
@@ -43,7 +43,8 @@ pub fn matches(m: &ArgMatches) -> Result<Option<Cmd>> {
|
||||
/// Represents the envelope subcommand.
|
||||
pub fn subcmd() -> Command {
|
||||
Command::new(CMD_ENVELOPE)
|
||||
.about("Manage envelopes")
|
||||
.about("Subcommand to manage envelopes")
|
||||
.long_about("Subcommand to manage envelopes like list")
|
||||
.subcommands([Command::new(CMD_LIST)
|
||||
.alias("lst")
|
||||
.about("List envelopes")
|
||||
|
||||
@@ -57,7 +57,8 @@ pub fn matches(m: &ArgMatches) -> Result<Option<Cmd>> {
|
||||
/// Represents the flag subcommand.
|
||||
pub fn subcmd() -> Command {
|
||||
Command::new(CMD_FLAG)
|
||||
.about("Manage flags")
|
||||
.about("Subcommand to manage flags")
|
||||
.long_about("Subcommand to manage flags like add, set or remove")
|
||||
.subcommand_required(true)
|
||||
.arg_required_else_help(true)
|
||||
.subcommand(
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user