From 9f28d49c1571b81cbdd8ceae9d383410f4d844b8 Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Sun, 17 Nov 2024 23:10:53 -0600 Subject: [PATCH] feat: add version subcommand (#172) --- asm-lsp/bin/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/asm-lsp/bin/main.rs b/asm-lsp/bin/main.rs index 65455a21..ccdb138f 100644 --- a/asm-lsp/bin/main.rs +++ b/asm-lsp/bin/main.rs @@ -28,6 +28,8 @@ enum Commands { GenConfig(GenerateArgs), /// Print information about asm-lsp Info, + /// Print the version number only + Version, #[clap(hide(true))] Run, } @@ -70,6 +72,7 @@ pub fn main() -> Result<()> { std::process::exit(1); } } + Commands::Version => println!("{}", env!("CARGO_PKG_VERSION")), Commands::Info => run_info(), Commands::Run => run_lsp()?, }