feat(complete): Upgrade clap_complete

Changes:
- Change completion order to subcommands, positional values, flags
- When completing `-[TAB]`, prioritize shorts over longs
- De-duplicate completions that have the same result (longs, shorts, aliases)
- Group candidates from the same `CompletionCandidate::tag`
- Sort candidates within a `CompletionCandidate::tag` by their `display_order`
This commit is contained in:
Ed Page 2024-09-20 15:07:46 -05:00
parent eaee77dc15
commit 86a1ff300d
2 changed files with 8 additions and 8 deletions

12
Cargo.lock generated
View File

@ -547,18 +547,18 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.17"
version = "4.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac"
checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
version = "4.5.17"
version = "4.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73"
checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b"
dependencies = [
"anstream",
"anstyle",
@ -569,9 +569,9 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.5.28"
version = "4.5.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b378c786d3bde9442d2c6dd7e6080b2a818db2b96e30d6e7f1b6d224eb617d3"
checksum = "8937760c3f4c60871870b8c3ee5f9b30771f792a7045c48bcbba999d7d6b3b8e"
dependencies = [
"clap",
"clap_lex",

View File

@ -35,8 +35,8 @@ cargo-test-support = { version = "0.4.0", path = "crates/cargo-test-support" }
cargo-util = { version = "0.2.14", path = "crates/cargo-util" }
cargo-util-schemas = { version = "0.6.0", path = "crates/cargo-util-schemas" }
cargo_metadata = "0.18.1"
clap = "4.5.17"
clap_complete = { version = "4.5.28", features = ["unstable-dynamic"] }
clap = "4.5.18"
clap_complete = { version = "4.5.29", features = ["unstable-dynamic"] }
color-print = "0.3.6"
completest-pty = "0.5.3"
core-foundation = { version = "0.10.0", features = ["mac_os_10_7_support"] }