feat: move configuration files inside home folder
This commit is contained in:
11
home/.config/zsh/ohmyzsh/plugins/tailscale/README.md
Normal file
11
home/.config/zsh/ohmyzsh/plugins/tailscale/README.md
Normal 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)
|
@ -0,0 +1,25 @@
|
||||
if (( ! $+commands[tailscale] && ! $+aliases[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
|
||||
|
||||
if (( $+commands[tailscale] )); then
|
||||
_comps[tailscale]=_tailscale
|
||||
elif (( $+aliases[tailscale] )); then
|
||||
_comps[${aliases[tailscale]:t}]=_tailscale
|
||||
fi
|
||||
fi
|
||||
|
||||
# If using the alias, let's make sure that the aliased executable is also bound
|
||||
# in case the alias points to "Tailscale" instead of "tailscale".
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/discussions/12928
|
||||
if (( $+aliases[tailscale] )); then
|
||||
_comps[${aliases[tailscale]:t}]=_tailscale
|
||||
fi
|
||||
|
||||
tailscale completion zsh >| "$ZSH_CACHE_DIR/completions/_tailscale" &|
|
Reference in New Issue
Block a user