Skip to content

zsh completions installed by the cask aren't picked up by compinit (no #compdef header) #466

Open

Description

@SherriAlexander-Velir

Hey there! Found this one while working around a separate Gatekeeper issue on the 0.11.0 cask (#465).

things completions zsh emits a bash-style script:

autoload -U +X bashcompinit && bashcompinit
complete -C things things

The cask's generate_completions_from_executable installs that output as share/zsh/site-functions/_things, but with no #compdef things header, compinit never registers it -- so zsh users who install via brew don't get completions, with no error to tell them why:

$ things completions zsh > /opt/homebrew/share/zsh/site-functions/_things
$ zsh -fc 'fpath=(/opt/homebrew/share/zsh/site-functions $fpath); autoload -U compinit; compinit -D -u; echo ${_comps[things]:-<none>}'
<none>

The script itself is fine when sourced -- _comps[things] comes back as _bash_complete -C things -- it's just not in a form that works from fpath.

Environment:

  • things 0.11.0 (commit d671ee7), installed via ryanlewis/tap/things
  • macOS 26.7.1, Apple Silicon (arm64)
  • Homebrew 7.0.10

Possible fixes:

  • Emit a native zsh completion script with a #compdef things header, or
  • Drop :zsh from the cask's shells: list and document adding the two lines above to ~/.zshrc instead.

Expected: after brew install/brew upgrade, the installed _things file gets picked up by compinit and tab completion works in zsh.

Happy to test either approach if that would be helpful. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions