ohmyzsh/plugins/talosctl/talosctl.plugin.zsh
Jonathan Stacks 92c28758b9
feat(talosctl): Add completions for talosctl
Signed-off-by: Jonathan Stacks <jonstacks@users.noreply.github.com>
2026-04-09 21:49:41 -05:00

14 lines
435 B
Bash

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