mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Use convention for completion file
This commit is contained in:
parent
95bed78e58
commit
c03a945a3c
1 changed files with 9 additions and 8 deletions
|
|
@ -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'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue