1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-14 22:47:45 +08:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Carlo Sala
ea8068aa3e
fix(tailscale): make completion loading async 2024-08-29 12:19:19 +02:00
Luke Ashe-Browne
e2ba73af63
feat(tailscale): new tailscale plugin (#12523) 2024-08-28 15:01:36 -07:00
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# tailscale
This plugin provides completion for [tailscale](https://tailscale.com/) (Easy software-defined networks using an implementation of wireguard).
To use it, add `tailscale` to the plugins array in your zshrc file.
```
plugins=(... tailscale)
```
**Author:** [@lukeab](https://github.com/lukeab)

View File

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