Skip to content

ZSH completion

Arch packages

Config

For active system-wide completions see

  • /usr/share/zsh/functions/Completion/
  • /usr/share/zsh/site-functions/ (zsh-completions installs it's files here i.e.)
  • ~/.cache/zsh4humans/v5/zsh-completions/src (added by zsh4humans)
  • Custom definitions:
    • ~/.config/shell/zsh/completion (added in ~/.config/shell/zsh/conf.d/05_completion.sh)

Show current completion locations:

echo $fpath | tr ' ' '\n' | grep -i completion

Create/update completions in $ZDOTDIR/completion:

~/bin/custom/zsh_create_completions.sh
man zshcompsys

Bash completetion compatibility

  • Using bashcompinit
  • Example: ~/.local/share/mise/installs/gcloud/latest/completion.zsh.inc