Documentation and a few aliases
This commit is contained in:
parent
49f7746f57
commit
8daf40d59e
1 changed files with 11 additions and 5 deletions
16
src/cli.rs
16
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<String>,
|
||||
|
||||
/// 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<u32>,
|
||||
},
|
||||
/// Set or get crossfade
|
||||
#[command(visible_alias = "fade")]
|
||||
Crossfade {
|
||||
#[arg(short, long, value_hint = ValueHint::Other)]
|
||||
seconds: Option<i64>,
|
||||
|
@ -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<u32>,
|
||||
},
|
||||
/// 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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue