From 6f09ab1f647eea41a33643e16320b57eaf40e63c Mon Sep 17 00:00:00 2001 From: salmon Date: Wed, 12 Aug 2026 02:17:19 +0200 Subject: delete unused path for queue --- completions/_rsp | 2 +- src/cli.rs | 22 +++++----------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/completions/_rsp b/completions/_rsp index ade1850..d2db44e 100644 --- a/completions/_rsp +++ b/completions/_rsp @@ -3,7 +3,7 @@ functions[_rsp_clap]=$functions[_rsp] _rsp() { case $words[2] in - play|queue) + play) if (( CURRENT > 2 )); then local cur="${words[$CURRENT]}" if [[ "$words[2]" == "play" && "$cur" == -* ]]; then diff --git a/src/cli.rs b/src/cli.rs index b1e6230..12bc3b0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -64,13 +64,8 @@ pub enum Commands { #[arg(value_name = "MODE")] mode: Option, }, - /// Queue management - Queue { - #[arg(value_name = "POSITION")] - position: Option, - #[arg(value_name = "QUERY")] - query: Option, - }, + /// Show the queue + Queue, /// Show player status Status, /// Scan music paths to populate database @@ -197,16 +192,9 @@ impl Cli { crate::daemon::send_command("shuffle".to_string())?; } } - Commands::Queue { position, query } => match (position, query) { - (None, None) => { - crate::daemon::send_command("queue".to_string())?; - } - (pos, Some(q)) => { - let pos = pos.as_deref().unwrap_or("last"); - crate::daemon::send_command(format!("queue {} {}", pos, q))?; - } - _ => {} - }, + Commands::Queue => { + crate::daemon::send_command("queue".to_string())?; + } Commands::Status => { crate::daemon::send_command("status".to_string())?; } -- cgit v1.2.3