mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-19 02:02:32 +01:00
feat(ngrok): add completion plugin (#12826)
This commit is contained in:
parent
366d254352
commit
69a6359f7c
2 changed files with 34 additions and 0 deletions
14
plugins/ngrok/ngrok.plugin.zsh
Normal file
14
plugins/ngrok/ngrok.plugin.zsh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Autocompletion for ngrok
|
||||
if (( ! $+commands[ngrok] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `ngrok`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_ngrok" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _ngrok
|
||||
_comps[ngrok]=_ngrok
|
||||
fi
|
||||
|
||||
ngrok completion zsh >| "$ZSH_CACHE_DIR/completions/_ngrok" &|
|
||||
Loading…
Add table
Add a link
Reference in a new issue