allow multiple occurrences of flags

This commit is contained in:
figsoda 2021-02-04 19:06:57 -05:00
parent d398077ed8
commit 37fc4dc30a

View file

@ -12,19 +12,23 @@ use crate::mpd::{Status, Track};
#[clap(global_setting = AppSettings::ColoredHelp)]
pub struct Opts {
/// Clear query on play
#[clap(long)]
#[clap(long, multiple_occurrences(true))]
pub clear_query_on_play: bool,
/// Cycle through the queue
#[clap(long)]
#[clap(long, multiple_occurrences(true))]
pub cycle: bool,
/// Don't clear query on play
#[clap(long, overrides_with("clear-query-on-play"))]
#[clap(
long,
multiple_occurrences(true),
overrides_with("clear-query-on-play")
)]
pub no_clear_query_on_play: bool,
/// Don't cycle through the queue
#[clap(long, overrides_with("cycle"))]
#[clap(long, multiple_occurrences(true), overrides_with("cycle"))]
pub no_cycle: bool,
/// Specify the address of the mpd server