From c3fdbdecb1170470c676f3685bbe4d97a1e41ffe Mon Sep 17 00:00:00 2001 From: x71c9 <108585118+x71c9@users.noreply.github.com> Date: Tue, 30 Jun 2026 19:06:24 +0200 Subject: [PATCH] feat: add --version --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0cff0b5..61954fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,10 @@ fn parse_args() -> anyhow::Result { print = true; no_clipboard = true; } + "-v" | "--version" => { + println!("{}", env!("CARGO_PKG_VERSION")); + std::process::exit(0); + } s if s.starts_with('-') => anyhow::bail!("unknown flag: {s}"), _ => file = Some(std::path::PathBuf::from(&arg)), }