From bbcbfebc839d97a6582ec2210d4a26314f81ca26 Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Sun, 13 Sep 2026 12:16:28 +0200 Subject: [PATCH] Add -V/--version flag Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01GLUwWE2KmFPzhKaf67tWbx --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index e4e5e37..19da381 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,7 @@ Options: --midi-name Connect to the MIDI output port whose name contains instead of creating a virtual port --list-midi List available MIDI output ports and exit + -V, --version Print version and exit -h, --help Print this message and exit A default MIDI port can be set in ~/.config/orca-rs/config.toml: @@ -77,6 +78,10 @@ fn main() { } return; } + "-V" | "--version" => { + println!("orca-rs {}", env!("CARGO_PKG_VERSION")); + return; + } "-h" | "--help" => { print!("{USAGE}"); return;