Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh completion adds incorrect spaces #67

Open
rrotter opened this issue May 17, 2024 · 1 comment
Open

zsh completion adds incorrect spaces #67

rrotter opened this issue May 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rrotter
Copy link

rrotter commented May 17, 2024

Describe the bug
zsh completion adds a space every time a partial completion is entered (most noticeably after "@" versions and "/" in paths), requiring deleting the space before continuing to type command

To Reproduce

  • use zsh
  • try completing the following commands:
    • type mise link node<tab> (completes to mise link node@ with trailing space)
    • type mise link node@18 /opt/homebr<tab> (completes to mise link node@18 /opt/homebrew with trailing space)

Expected behavior
above would complete to
mise link node@ no trailing space
mise link node@18 /opt/homebrew/ trailing slash, no trailing space

mise doctor output

version: 2024.5.16 macos-arm64 (2024-05-15)
activated: yes
shims_on_path: no

build_info: 
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Wed, 15 May 2024 04:59:00 +0000
  Rust Version: rustc 1.78.0 (9b00956e5 2024-04-29) (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
  go
  npm
  pipx
  ubi

plugins: 
  bun     (core)
  deno    (core)
  erlang  (core)
  go      (core)
  java    (core)
  jq      https://github.com/mise-plugins/asdf-jq.git#6d86d19
  node    (core)
  python  (core)
  ruby    (core)
  tiny    https://github.com/mise-plugins/mise-tiny.git#c532b14
  usage   https://github.com/jdx/mise-usage.git#fe3888a
  zig     (core)

toolset: 
  [email protected]  
  [email protected]   

env_vars: 
  MISE_SHELL=zsh

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  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
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "/Users/rrotter/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
No problems found

Additional context
I don't think there is anything remarkable about my .zshrc. No problems w/ completion on other commands, I'm not using omz or any other frameworks, just

fpath+=${HOMEBREW_PREFIX}/share/zsh/site-functions
fpath+=${HOMEBREW_PREFIX}/share/zsh-completions
autoload -Uz compinit && compinit
@rrotter rrotter added the bug Something isn't working label May 17, 2024
@jdx jdx transferred this issue from jdx/mise May 17, 2024
@jdx
Copy link
Owner

jdx commented May 17, 2024

I'm seeing the same behavior, I think this somehow needs to be able to use _combination as some kind of parameter in the kdl config:

_arguments '*: :($(usage complete-word -s "$spec" -- "${words[@]}" ))'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants