From 8daf40d59e9c20d2f95420a02c186aaeb0543450 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Wed, 2 Jul 2025 23:29:01 +0200 Subject: [PATCH] Documentation and a few aliases --- src/cli.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 0630136..f298bf9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -5,8 +5,8 @@ use clap_complete::Shell; #[command( author = "Nox Sluijtman", version, - about, - long_about = "A small, opinionated MPD client", + about = "A small MPD client", + long_about = "I like how 'mpc' works for the most part, but I don't use most of its features and there are some parts of it that I feel could be more ergonomic. In comes 'noise', an opinionated, even more minimalist 'mpd' client than 'mpc'.", name = "noise" )] #[command(propagate_version = true)] @@ -19,7 +19,7 @@ pub struct Cli { #[arg(short, long, global = true)] pub verbose: bool, /// Hostname where MPD listens at - #[arg(short = 'H', long, global = true)] + #[arg(short = 'H', long, global = true, value_hint = ValueHint::Hostname)] pub host: Option, /// Generate shell completions @@ -32,20 +32,23 @@ pub struct Cli { #[derive(Subcommand, Debug, PartialEq)] pub enum Commands { - /// Toggle MPD stream + /// Toggle MPD playback Toggle, /// Skip to the next track + #[command(visible_alias = "skip")] Next, /// Revert to the previous track Prev, /// Stops playing Stop, /// Play queueueu + #[command(visible_alias = "start")] Play { #[arg(short, long, value_hint = ValueHint::Other)] track: Option, }, /// Set or get crossfade + #[command(visible_alias = "fade")] Crossfade { #[arg(short, long, value_hint = ValueHint::Other)] seconds: Option, @@ -57,6 +60,7 @@ pub enum Commands { /// Clear current queueueu Clear, /// Query database + #[command(visible_alias = "q")] Search { ///Search query #[arg(trailing_var_arg = true, value_hint = ValueHint::Other)] @@ -69,7 +73,8 @@ pub enum Commands { // #[arg(short, long)] // insert: Option, }, - /// Query database differently + /// Query database autistically + #[command(visible_alias = "fd")] Find { ///Search query #[arg(trailing_var_arg = true, value_hint = ValueHint::Other)] @@ -81,6 +86,7 @@ pub enum Commands { append: bool, }, /// List items in the current queueueu + #[command(visible_alias = "ls")] List { #[arg(short, long)] file: bool,