From d02ced62971fcfe8c8eb785fcd0c3b2eab26348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Tue, 25 Aug 2026 12:55:16 +0200 Subject: [PATCH] feat: add version argument --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0f2c00f..1db82d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,6 +46,13 @@ const ENVIRONMENT_NAME: &'static str = "COSMIC"; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<()> { + if let Some(arg) = env::args().nth(1) + && (arg == "--version" || arg == "-V") + { + println!("cosmic-session {}", env!("CARGO_PKG_VERSION")); + return Ok(()); + } + color_eyre::install().wrap_err("failed to install color_eyre error handler")?; let trace = tracing_subscriber::registry();