v3.6.1
===================================================================== --- Changes ------------------------------ - Adjusted USAGE (from zsh/lib/utils/io.zsh) to allow dynamic variable insertion in help dialogues by setting USAGE__<help-group> and using the syntax listed - Various quality-of-life changes and and fixes to experimental kubectl plugin --- Bug fixes ---------------------------- - sourcing 'scwrypts.plugin.zsh' no longer sets __SCWRYPT=1 in your current environment
This commit is contained in:
31
plugins/kubectl/driver/kubectl.completion.zsh
Normal file
31
plugins/kubectl/driver/kubectl.completion.zsh
Normal file
@ -0,0 +1,31 @@
|
||||
#####################################################################
|
||||
command -v compdef >/dev/null 2>&1 || return 0
|
||||
#####################################################################
|
||||
|
||||
_k() {
|
||||
local C=$(k meta get context)
|
||||
local NS=$(k meta get namespace)
|
||||
|
||||
local KUBEWORDS=(kubectl)
|
||||
[ $C ] && KUBEWORDS+=(--context $C)
|
||||
[ $NS ] && KUBEWORDS+=(--namespace $NS)
|
||||
|
||||
words="$KUBEWORDS ${words[@]:1}"
|
||||
_kubectl
|
||||
}
|
||||
|
||||
compdef _k k
|
||||
|
||||
#####################################################################
|
||||
_h() {
|
||||
local C=$(k meta get context)
|
||||
local NS=$(k meta get namespace)
|
||||
|
||||
local KUBEWORDS=(kubectl)
|
||||
[ $C ] && KUBEWORDS+=(--context $C)
|
||||
[ $NS ] && KUBEWORDS+=(--namespace $NS)
|
||||
|
||||
words="$KUBEWORDS ${words[@]:1}"
|
||||
_helm
|
||||
}
|
||||
compdef _h h
|
Reference in New Issue
Block a user