2020-11-18 12:44:46 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if (which kubectl &> /dev/null)
|
|
|
|
then
|
|
|
|
|
|
|
|
# activate completion
|
|
|
|
source <(kubectl completion bash)
|
|
|
|
|
|
|
|
# create a quick alias
|
|
|
|
alias k=kubectl
|
2021-04-23 12:57:08 +02:00
|
|
|
alias ks="kubectl --namespace kube-system"
|
2020-11-18 12:44:46 +01:00
|
|
|
|
|
|
|
# add completion for the alias as well
|
|
|
|
complete -o default -F __start_kubectl k
|
2021-04-23 12:57:08 +02:00
|
|
|
complete -o default -F __start_kubectl ks
|
2020-11-18 12:44:46 +01:00
|
|
|
|
|
|
|
fi
|