From 35b951967d466b7b38774dc98bc2a3794e0381f3 Mon Sep 17 00:00:00 2001 From: trinity-1686a Date: Sun, 1 Jan 2023 11:03:17 +0100 Subject: [PATCH] add a few help messages to the cli --- plume-cli/src/list.rs | 13 +++++++++---- plume-cli/src/timeline.rs | 9 ++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plume-cli/src/list.rs b/plume-cli/src/list.rs index 340c974f..3670879a 100644 --- a/plume-cli/src/list.rs +++ b/plume-cli/src/list.rs @@ -19,7 +19,9 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .short("t") .long("type") .takes_value(true) - .help("The type of this list"), + .help( + r#"The type of this list (one of "user", "blog", "word" or "prefix")"#, + ), ) .arg( Arg::with_name("user") @@ -51,7 +53,8 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .short("y") .long("yes") .help("Confirm the deletion"), - ), + ) + .about("Delete a list"), ) .subcommand( SubCommand::with_name("add") @@ -75,7 +78,8 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .long("value") .takes_value(true) .help("The value to add"), - ), + ) + .about("Add element to a list"), ) .subcommand( SubCommand::with_name("rm") @@ -99,7 +103,8 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .long("value") .takes_value(true) .help("The value to remove"), - ), + ) + .about("Remove element from list"), ) } diff --git a/plume-cli/src/timeline.rs b/plume-cli/src/timeline.rs index ee78b731..225811ef 100644 --- a/plume-cli/src/timeline.rs +++ b/plume-cli/src/timeline.rs @@ -62,7 +62,8 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .short("y") .long("yes") .help("Confirm the deletion"), - ), + ) + .about("Delete a timeline"), ) .subcommand( SubCommand::with_name("edit") @@ -86,7 +87,8 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .long("query") .takes_value(true) .help("The query posts in this timelines have to match"), - ), + ) + .about("Edit the query of a timeline"), ) .subcommand( SubCommand::with_name("repopulate") @@ -112,7 +114,8 @@ pub fn command<'a, 'b>() -> App<'a, 'b> { .long("preload-count") .takes_value(true) .help("Number of posts to try to preload in this timeline at its creation"), - ), + ) + .about("Repopulate a timeline. Run this after modifying a list the timeline depends on."), ) }