.
This commit is contained in:
parent
397ff450de
commit
a49a55f523
@ -13,6 +13,9 @@ function kubernetes_configs(){
|
||||
for file in $(find "${KUBE_CONFIG_DIR}" -type f -name "$KUBE_CONFIG_EXTENTION"); do
|
||||
export KUBECONFIG="$file:$KUBECONFIG"
|
||||
done
|
||||
if [[ $(command -v kubectl) ]];then
|
||||
complete -W "$(kubectl config get-contexts -o name)" kuc
|
||||
fi
|
||||
}
|
||||
kubernetes_configs
|
||||
|
||||
@ -25,9 +28,3 @@ function kuc(){
|
||||
# use kubernetes context <param>
|
||||
kubectl config use-context "$1"
|
||||
}
|
||||
|
||||
#bash completion for function kuc
|
||||
if [[ $(command -v kubectl) ]];then
|
||||
complete -W "$(kubectl config get-contexts -o name)" kuc
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user