diff --git a/Cargo.lock b/Cargo.lock index 72b1a7f35e..f11dd9d9e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1403,6 +1403,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1630,7 +1639,7 @@ dependencies = [ "indicatif", "indoc", "insta", - "itertools", + "itertools 0.12.1", "log", "num_cpus", "once_cell", @@ -1671,7 +1680,7 @@ dependencies = [ "versions", "walkdir", "which", - "xx 1.1.4", + "xx", "zip", ] @@ -3260,14 +3269,14 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "usage-lib" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeebfca27b4e59b6f065adb43095f9563d691fea3075c34483c6808e301cfcbc" +checksum = "169665ca600da05053b6c2df83d243fc45cf58e8373dd7b939aaf87f664629fe" dependencies = [ "clap", "heck 0.5.0", "indexmap 2.2.6", - "itertools", + "itertools 0.13.0", "kdl", "log", "miette", @@ -3276,7 +3285,7 @@ dependencies = [ "shell-escape", "strum", "thiserror", - "xx 0.5.1", + "xx", ] [[package]] @@ -3309,7 +3318,7 @@ version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38a8931f8d167b6448076020e70b9de46dcf5ea1731212481a092d0071c4ac5b" dependencies = [ - "itertools", + "itertools 0.12.1", "nom", "serde", ] @@ -3735,20 +3744,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "xx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e56d3f594fa196a364c0fdd4bab4b4e81fe46712c6754c9bc0930a6eac6998d" -dependencies = [ - "duct", - "filetime", - "log", - "miette", - "regex", - "thiserror", -] - [[package]] name = "xx" version = "1.1.4" diff --git a/Cargo.toml b/Cargo.toml index 35fd9dcd69..8e07fe8f2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -115,7 +115,7 @@ tokio = { version = "1.37.0", features = [ toml = { version = "0.8.12", features = ["parse"] } toml_edit = { version = "0.22.12", features = ["parse"] } url = "2.5.0" -usage-lib = { version = "0.2", features = ["clap"] } +usage-lib = { version = "0.3", features = ["clap"] } versions = { version = "6.2.0", features = ["serde"] } walkdir = "2.5.0" which = "6.0.1" diff --git a/completions/_mise b/completions/_mise index 1771c9c992..c4ada2abea 100644 --- a/completions/_mise +++ b/completions/_mise @@ -34,7 +34,7 @@ _mise() { _store_cache _usage_mise_spec spec fi - _arguments '*: :($(usage complete-word -s "$spec" -- "${words[@]}" ))' + _arguments "*: :(($(usage complete-word --shell zsh -s "$spec" -- "${words[@]}" )))" return 0 } diff --git a/completions/mise.bash b/completions/mise.bash index 50258940d0..c173c8fcd0 100644 --- a/completions/mise.bash +++ b/completions/mise.bash @@ -9,8 +9,8 @@ _mise() { if [[ -z ${_USAGE_SPEC_MISE:-} ]]; then _USAGE_SPEC_MISE="$(mise usage)" fi - - COMPREPLY=( $(usage complete-word -s "${_USAGE_SPEC_MISE}" --cword="$COMP_CWORD" -- "${COMP_WORDS[@]}" ) ) + + COMPREPLY=( $(usage complete-word --shell bash -s "${_USAGE_SPEC_MISE}" --cword="$COMP_CWORD" -- "${COMP_WORDS[@]}" ) ) if [[ $? -ne 0 ]]; then unset COMPREPLY fi diff --git a/completions/mise.fish b/completions/mise.fish index addb4772fe..1b9d2fc6f4 100644 --- a/completions/mise.fish +++ b/completions/mise.fish @@ -7,4 +7,4 @@ if ! command -v usage &> /dev/null end set _usage_spec_mise (mise usage | string collect) -complete -xc mise -a '(usage complete-word -s "$_usage_spec_mise" -- (commandline -cop) (commandline -t))' +complete -xc mise -a '(usage complete-word --shell fish -s "$_usage_spec_mise" -- (commandline -cop) (commandline -t))'