Documentation and a few aliases

This commit is contained in:
Nox Sluijtman 2025-07-02 23:29:01 +02:00
parent 49f7746f57
commit 8daf40d59e
Signed by: Egg
SSH key fingerprint: SHA256:2sG9X3C7Xvq2svGumz1/k7cm8l4G9+qAtAeugqB4J9M

View file

@ -5,8 +5,8 @@ use clap_complete::Shell;
#[command( #[command(
author = "Nox Sluijtman", author = "Nox Sluijtman",
version, version,
about, about = "A small MPD client",
long_about = "A small, opinionated 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" name = "noise"
)] )]
#[command(propagate_version = true)] #[command(propagate_version = true)]
@ -19,7 +19,7 @@ pub struct Cli {
#[arg(short, long, global = true)] #[arg(short, long, global = true)]
pub verbose: bool, pub verbose: bool,
/// Hostname where MPD listens at /// Hostname where MPD listens at
#[arg(short = 'H', long, global = true)] #[arg(short = 'H', long, global = true, value_hint = ValueHint::Hostname)]
pub host: Option<String>, pub host: Option<String>,
/// Generate shell completions /// Generate shell completions
@ -32,20 +32,23 @@ pub struct Cli {
#[derive(Subcommand, Debug, PartialEq)] #[derive(Subcommand, Debug, PartialEq)]
pub enum Commands { pub enum Commands {
/// Toggle MPD stream /// Toggle MPD playback
Toggle, Toggle,
/// Skip to the next track /// Skip to the next track
#[command(visible_alias = "skip")]
Next, Next,
/// Revert to the previous track /// Revert to the previous track
Prev, Prev,
/// Stops playing /// Stops playing
Stop, Stop,
/// Play queueueu /// Play queueueu
#[command(visible_alias = "start")]
Play { Play {
#[arg(short, long, value_hint = ValueHint::Other)] #[arg(short, long, value_hint = ValueHint::Other)]
track: Option<u32>, track: Option<u32>,
}, },
/// Set or get crossfade /// Set or get crossfade
#[command(visible_alias = "fade")]
Crossfade { Crossfade {
#[arg(short, long, value_hint = ValueHint::Other)] #[arg(short, long, value_hint = ValueHint::Other)]
seconds: Option<i64>, seconds: Option<i64>,
@ -57,6 +60,7 @@ pub enum Commands {
/// Clear current queueueu /// Clear current queueueu
Clear, Clear,
/// Query database /// Query database
#[command(visible_alias = "q")]
Search { Search {
///Search query ///Search query
#[arg(trailing_var_arg = true, value_hint = ValueHint::Other)] #[arg(trailing_var_arg = true, value_hint = ValueHint::Other)]
@ -69,7 +73,8 @@ pub enum Commands {
// #[arg(short, long)] // #[arg(short, long)]
// insert: Option<u32>, // insert: Option<u32>,
}, },
/// Query database differently /// Query database autistically
#[command(visible_alias = "fd")]
Find { Find {
///Search query ///Search query
#[arg(trailing_var_arg = true, value_hint = ValueHint::Other)] #[arg(trailing_var_arg = true, value_hint = ValueHint::Other)]
@ -81,6 +86,7 @@ pub enum Commands {
append: bool, append: bool,
}, },
/// List items in the current queueueu /// List items in the current queueueu
#[command(visible_alias = "ls")]
List { List {
#[arg(short, long)] #[arg(short, long)]
file: bool, file: bool,