feat(sprite): Add completions for sprite

sprite is the CLI tool for https://docs.sprites.dev

Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
This commit is contained in:
Jonathan Stacks 2026-04-20 20:49:39 -05:00
commit b6aeb73109
No known key found for this signature in database
GPG key ID: FB934A2184BB941E
2 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,14 @@
# Autocompletion for sprite
if (( ! $+commands[sprite] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `sprite`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_sprite" ]]; then
typeset -g -A _comps
autoload -Uz _sprite
_comps[sprite]=_sprite
fi
sprite completion zsh >| "$ZSH_CACHE_DIR/completions/_sprite" &|