about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-24 09:51:32 +0000
committerbors <bors@rust-lang.org>2024-02-24 09:51:32 +0000
commit4a8d0f7f565b6df45da5522dd7366a4df3460cd7 (patch)
tree198263f4c78be75774a7d4fe53d03ac5c0fae0d9
parent03b3cb6be9f21c082f4206b35c7fe7f291c94eaa (diff)
parent30429f8ece19d701cff8f5c547c2069fbf651cfd (diff)
downloadrust-4a8d0f7f565b6df45da5522dd7366a4df3460cd7.tar.gz
rust-4a8d0f7f565b6df45da5522dd7366a4df3460cd7.zip
Auto merge of #16654 - graemer957:feature/short_version_flag, r=lnicola
Add short flag -V for consistency with other rust tooling

Minor change to add the `-V` short flag to `rust-analyzer` to bring it in-line with other rust tooling such as:

> rustc -V
```bash
rustc 1.76.0 (07dca489a 2024-02-04)
```

> rustup -V
```bash
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.76.0 (07dca489a 2024-02-04)`
```

> cargo -V
```bash
cargo 1.76.0 (c84b36747 2024-01-18)
```
-rw-r--r--crates/rust-analyzer/src/cli/flags.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/cli/flags.rs b/crates/rust-analyzer/src/cli/flags.rs
index 493e614dce6..3f68c5d053b 100644
--- a/crates/rust-analyzer/src/cli/flags.rs
+++ b/crates/rust-analyzer/src/cli/flags.rs
@@ -30,7 +30,7 @@ xflags::xflags! {
 
         default cmd lsp-server {
             /// Print version.
-            optional --version
+            optional -V, --version
 
             /// Dump a LSP config JSON schema.
             optional --print-config-schema