mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Add plugin for finch
This commit is contained in:
parent
d57775d89e
commit
f5c03eae01
2 changed files with 30 additions and 0 deletions
15
plugins/finch/README.md
Normal file
15
plugins/finch/README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# 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)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
|
||||||
|
| Alias | Command | Description |
|
||||||
|
| :------ | :---------- | :----------------------------------------------- |
|
||||||
|
| fvm | `finch vm` | Operate on the Virtual Machine container runtime |
|
||||||
15
plugins/finch/finch.plugin.zsh
Normal file
15
plugins/finch/finch.plugin.zsh
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
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" &|
|
||||||
|
|
||||||
|
alias fvm='finch vm'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue