This commit is contained in:
Simon Marty 2025-12-01 21:36:56 -08:00 committed by GitHub
commit 04da55db27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

9
plugins/finch/README.md Normal file
View file

@ -0,0 +1,9 @@
# Finch plugin
This plugin adds auto-completion and aliases for [finch](https://runfinch.com/).
To use it add `finch` to the plugins array in your zshrc file.
```zsh
plugins=(... finch)
```

View file

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