From 86a1ff300daa9199b8ff918119f201636e19d45f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 20 Sep 2024 15:07:46 -0500 Subject: [PATCH] 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` --- Cargo.lock | 12 ++++++------ Cargo.toml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7d18b7a94..b55e5e42f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/Cargo.toml b/Cargo.toml index 9146706e8..e7d2f7731 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] }