ohmyzsh/plugins/tenv/tenv.plugin.zsh
Carlos Colaço fd403258f9
feat(tenv): Add tenv plugin
Add plugin with completions for tenv:
OpenTofu, Terraform, Terragrunt and Atmos version manager, written in Go.
2024-05-26 13:52:25 +02:00

15 lines
400 B
Bash

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