Use convention for completion file

This commit is contained in:
Marc Cornellà 2025-11-22 17:58:22 +01:00
commit c03a945a3c

View file

@ -1,16 +1,17 @@
# Pulumi oh-my-zsh plugin (short aliases) if (( ! $+commands[pulumi] )); then
if ! command -v pulumi &> /dev/null; then
return return
fi fi
# Load completion if available # If the completion file doesn't exist yet, we need to autoload it and
if pulumi gen-completion zsh &> /dev/null; then # bind it to `pulumi`. Otherwise, compinit will have already done that.
autoload -U +X compinit && compinit if [[ ! -f "$ZSH_CACHE_DIR/completions/_pulumi" ]]; then
pulumi gen-completion zsh >! "${ZSH_CACHE_DIR:-$HOME/.zsh_cache}/_pulumi" typeset -g -A _comps
fpath=("${ZSH_CACHE_DIR:-$HOME/.zsh_cache}" $fpath) autoload -Uz _pulumi
_comps[pulumi]=_pulumi
fi fi
pulumi gen-completion zsh >| "$ZSH_CACHE_DIR/completions/_pulumi" &|
# Aliases # Aliases
alias p='pulumi' alias p='pulumi'
alias pu='pulumi up' alias pu='pulumi up'