mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 16:32:00 +00:00
Compare commits
4 Commits
9578efd8d5
...
04fd71d9a5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04fd71d9a5 | ||
|
|
7c10d9839f | ||
|
|
103246c198 | ||
|
|
d6fa1686be |
@@ -1,5 +1,14 @@
|
||||
# Autocompletion for invoke.
|
||||
#
|
||||
if [ $commands[invoke] ]; then
|
||||
source <(invoke --print-completion-script=zsh)
|
||||
# Autocompletion for the Invoke CLI (invoke).
|
||||
if (( ! $+commands[invoke] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `invoke`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_invoke" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _invoke
|
||||
_comps[invoke]=_invoke
|
||||
fi
|
||||
|
||||
invoke --print-completion-script=zsh >| "$ZSH_CACHE_DIR/completions/_invoke" &|
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
if [ $commands[istioctl] ]; then
|
||||
source <(istioctl completion zsh)
|
||||
compdef _istioctl istioctl
|
||||
# Autocompletion for the Istio CLI (istioctl).
|
||||
if (( ! $+commands[istioctl] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `istioctl`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_istioctl" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _istioctl
|
||||
_comps[istioctl]=_istioctl
|
||||
fi
|
||||
|
||||
istioctl completion zsh >| "$ZSH_CACHE_DIR/completions/_istioctl" &|
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
# Autocompletion for kn, the command line interface for knative
|
||||
# Autocompletion for kn, the command line interface for Knative.
|
||||
#
|
||||
# Author: https://github.com/btannous
|
||||
|
||||
if [ $commands[kn] ]; then
|
||||
source <(kn completion zsh)
|
||||
compdef _kn kn
|
||||
if (( ! $+commands[kn] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `kn`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kn" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _kn
|
||||
_comps[kn]=_kn
|
||||
fi
|
||||
|
||||
kn completion zsh >| "$ZSH_CACHE_DIR/completions/_kn" &|
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
if [ $commands[kompose] ]; then
|
||||
source <(kompose completion zsh)
|
||||
# Autocompletion for the Kompose CLI (kompose).
|
||||
if (( ! $+commands[kompose] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `kompose`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kompose" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _kompose
|
||||
_comps[kompose]=_kompose
|
||||
fi
|
||||
|
||||
kompose completion zsh >| "$ZSH_CACHE_DIR/completions/_kompose" &|
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
if [ $commands[kops] ]; then
|
||||
source <(kops completion zsh)
|
||||
# Autocompletion for the Kubernetes Operations CLI (kops).
|
||||
if (( ! $+commands[kops] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `kops`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kops" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _kops
|
||||
_comps[kops]=_kops
|
||||
fi
|
||||
|
||||
kops completion zsh >| "$ZSH_CACHE_DIR/completions/_kops" &|
|
||||
|
||||
@@ -2,7 +2,16 @@
|
||||
#
|
||||
# Author: https://github.com/kevinkirkup
|
||||
|
||||
if [ $commands[oc] ]; then
|
||||
source <(oc completion zsh)
|
||||
compdef _oc oc
|
||||
if (( ! $+commands[oc] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `oc`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_oc" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _oc
|
||||
_comps[oc]=_oc
|
||||
fi
|
||||
|
||||
oc completion zsh >| "$ZSH_CACHE_DIR/completions/_oc" &|
|
||||
|
||||
@@ -30,14 +30,20 @@ function tofu_version_prompt_info() {
|
||||
alias tt='tofu'
|
||||
alias tta='tofu apply'
|
||||
alias tta!='tofu apply -auto-approve'
|
||||
alias ttap='tofu apply -parallelism=1'
|
||||
alias ttapp='tofu apply tfplan'
|
||||
alias ttc='tofu console'
|
||||
alias ttd='tofu destroy'
|
||||
alias ttd!='tofu destroy -auto-approve'
|
||||
alias ttf='tofu fmt'
|
||||
alias ttfr='tofu fmt -recursive'
|
||||
alias tti='tofu init'
|
||||
alias ttir='tofu init -reconfigure'
|
||||
alias ttiu='tofu init -upgrade'
|
||||
alias ttiur='tofu init -upgrade -reconfigure'
|
||||
alias tto='tofu output'
|
||||
alias ttp='tofu plan'
|
||||
alias ttpo='tofu plan -out tfplan'
|
||||
alias ttv='tofu validate'
|
||||
alias tts='tofu state'
|
||||
alias ttsh='tofu show'
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
if [ $commands[operator-sdk] ]; then
|
||||
source <(operator-sdk completion zsh)
|
||||
compdef _operator-sdk operator-sdk
|
||||
# Autocompletion for the Operator SDK CLI (operator-sdk).
|
||||
if (( ! $+commands[operator-sdk] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `operator-sdk`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_operator-sdk" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _operator-sdk
|
||||
_comps[operator-sdk]=_operator-sdk
|
||||
fi
|
||||
|
||||
operator-sdk completion zsh >| "$ZSH_CACHE_DIR/completions/_operator-sdk" &|
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
if (( $+commands[plz] )); then
|
||||
source <(plz --completion_script)
|
||||
# Autocompletion for the Please build system CLI (plz).
|
||||
if (( ! $+commands[plz] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `plz`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_plz" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _plz
|
||||
_comps[plz]=_plz
|
||||
fi
|
||||
|
||||
plz --completion_script >| "$ZSH_CACHE_DIR/completions/_plz" &|
|
||||
|
||||
alias pb='plz build'
|
||||
alias pt='plz test'
|
||||
alias pw='plz watch'
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
# Autocompletion for svcat.
|
||||
#
|
||||
|
||||
if [ $commands[svcat] ]; then
|
||||
source <(svcat completion zsh)
|
||||
# Autocompletion for the Service Catalog CLI (svcat).
|
||||
if (( ! $+commands[svcat] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `svcat`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_svcat" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _svcat
|
||||
_comps[svcat]=_svcat
|
||||
fi
|
||||
|
||||
svcat completion zsh >| "$ZSH_CACHE_DIR/completions/_svcat" &|
|
||||
|
||||
@@ -4,21 +4,21 @@ function tf_prompt_info() {
|
||||
# check if in terraform dir and file exists
|
||||
[[ -d "${TF_DATA_DIR:-.terraform}" && -r "${TF_DATA_DIR:-.terraform}/environment" ]] || return
|
||||
|
||||
local workspace="$(< "${TF_DATA_DIR:-.terraform}/environment")"
|
||||
local workspace="$(<"${TF_DATA_DIR:-.terraform}/environment")"
|
||||
echo "${ZSH_THEME_TF_PROMPT_PREFIX-[}${workspace:gs/%/%%}${ZSH_THEME_TF_PROMPT_SUFFIX-]}"
|
||||
}
|
||||
|
||||
function tf_version_prompt_info() {
|
||||
local terraform_version
|
||||
terraform_version=$(terraform --version | head -n 1 | cut -d ' ' -f 2)
|
||||
echo "${ZSH_THEME_TF_VERSION_PROMPT_PREFIX-[}${terraform_version:gs/%/%%}${ZSH_THEME_TF_VERSION_PROMPT_SUFFIX-]}"
|
||||
local terraform_version
|
||||
terraform_version=$(terraform --version | head -n 1 | cut -d ' ' -f 2)
|
||||
echo "${ZSH_THEME_TF_VERSION_PROMPT_PREFIX-[}${terraform_version:gs/%/%%}${ZSH_THEME_TF_VERSION_PROMPT_SUFFIX-]}"
|
||||
}
|
||||
|
||||
|
||||
alias tf='terraform'
|
||||
alias tfa='terraform apply'
|
||||
alias tfa!='terraform apply -auto-approve'
|
||||
alias tfap='terraform apply -parallelism=1'
|
||||
alias tfapp='terraform apply tfplan'
|
||||
alias tfc='terraform console'
|
||||
alias tfd='terraform destroy'
|
||||
alias tfd!='terraform destroy -auto-approve'
|
||||
@@ -31,6 +31,7 @@ alias tfiu='terraform init -upgrade'
|
||||
alias tfiur='terraform init -upgrade -reconfigure'
|
||||
alias tfo='terraform output'
|
||||
alias tfp='terraform plan'
|
||||
alias tfpo='terraform plan -out tfplan'
|
||||
alias tfv='terraform validate'
|
||||
alias tfs='terraform state'
|
||||
alias tft='terraform test'
|
||||
|
||||
Reference in New Issue
Block a user