diff --git a/src/command.rs b/src/command.rs index 82655a6..b4b296e 100644 --- a/src/command.rs +++ b/src/command.rs @@ -102,11 +102,13 @@ pub enum Command { Shift(ShiftMode, Option), Search(String), Help, + Noop, } impl fmt::Display for Command { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let repr = match self { + Command::Noop => "noop".to_string(), Command::Quit => "quit".to_string(), Command::TogglePlay => "playpause".to_string(), Command::Stop => "stop".to_string(), @@ -324,6 +326,7 @@ pub fn parse(input: &str) -> Option { "volup" => Some(Command::VolumeUp), "voldown" => Some(Command::VolumeDown), "help" => Some(Command::Help), + "noop" => Some(Command::Noop), _ => None, } } diff --git a/src/commands.rs b/src/commands.rs index 903cb58..f0c2283 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -83,6 +83,7 @@ impl CommandManager { cmd: &Command, ) -> Result, String> { match cmd { + Command::Noop => Ok(None), Command::Quit => { s.quit(); Ok(None)