mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
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:
parent
349b9e49ce
commit
b6aeb73109
2 changed files with 34 additions and 0 deletions
14
plugins/sprite/sprite.plugin.zsh
Normal file
14
plugins/sprite/sprite.plugin.zsh
Normal 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" &|
|
||||
Loading…
Add table
Add a link
Reference in a new issue