Skip to content

Commit

Permalink
Update k8s_functions.sh
Browse files Browse the repository at this point in the history
- Added __refresh_kubecontexts function to refresh kubecontexts
- Updated complete command to use __refresh_kubecontexts function
  • Loading branch information
TechDufus committed Nov 27, 2023
1 parent 99836a5 commit 1315928
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/bash/files/bash/k8s_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function kexec() {
function kc() {
kubectl config use-context $1
}
function __refresh_kubecontexts() {
complete -W "$(kubectl config get-contexts -o=name)" kc
}

complete -W "$(kubectl config get-contexts -o=name)" kc
__refresh_kubecontexts
complete -W "$(kgnonly)" k.node.exec

0 comments on commit 1315928

Please sign in to comment.