jdx/mise

`mise completion zsh` started reporting `error: unexpected argument '--cache-key' found`

Closed this issue · 6 comments

Describe the bug

Since upgrading to version 2024.11.2+, this command now reports an error about the --cache-key argument, despite it not being provided. The command completes though, with a successful return code and correct-looking output. I don't

To Reproduce

$ mise completion zsh
error: unexpected argument '--cache-key' found

  tip: to pass '--cache-key' as a value, use '-- --cache-key'

Usage: usage generate completion <SHELL|BIN|--usage-cmd <USAGE_CMD>>

For more information, try '--help'.
#compdef mise
local curcontext="$curcontext"
...

Expected behavior
No error.

mise doctor output

$ mise doctor
version: 2024.11.5 macos-arm64 (2024-11-09)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Sat, 9 Nov 2024 16:08:51 +0000
  Rust Version: rustc 1.82.0 (f6e511eec 2024-10-15) (Homebrew)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

dirs:
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/Library/Caches/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files:
  ~/.config/mise/config.toml

backends:
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  usage  https://github.com/jdx/mise-usage.git#fe3888a

toolset:
  usage@0.3.0
  node@20.12.0
  bun@1.1.24
  ruby@3.3.0

env_vars:
  MISE_SHELL=zsh

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cache_prune_age = "30d"
  ci = false
  color = true
  debug = false
  disable_backends = []
  disable_default_registry = false
  disable_hints = []
  disable_tools = []
  experimental = false
  fetch_remote_versions_cache = "1h"
  fetch_remote_versions_timeout = "10s"
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = "30s"
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  lockfile = false
  log_level = "info"
  not_found_auto_install = true
  paranoid = false
  pin = false
  plugin_autoupdate_last_check_duration = "7d"
  quiet = false
  raw = false
  task_timings = false
  trace = false
  trusted_config_paths = []
  use_versions_host = true
  verbose = false
  yes = false

  [cargo]
  binstall = true

  [node]

  [pipx]
  uvx = false

  [python]
  default_packages_file = "~/.default-python-packages"
  pyenv_repo = "https://github.com/pyenv/pyenv.git"
  venv_auto_create = false
  venv_stdlib = false

  [ruby]
  default_packages_file = "~/.default-gems"
  ruby_build_repo = "https://github.com/rbenv/ruby-build.git"
  ruby_install = false
  ruby_install_repo = "https://github.com/postmodern/ruby-install.git"

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false
No warnings found
No problems found

Additional context

I use the oh-my-zsh mise plugin, which is what calls this completion command.

I checked through old versions and found the behaviour was introduced in 2024.11.2.

roele commented

Did you try to upgrade usage to most recent version (also see #2874)?

Yes this occurs on 2024.11.5

Yes this occurs on 2024.11.5

jdx commented

You didn't read what @roele said correctly

Ah, right, sorry there. Yes, mise remove usage --all resolved my issue. It dropped the Mise-installed 0.3.0, leaving me with Homebrew-installed 1.2.0.