config-bash/aliases.d/kubectl

15 lines
277 B
Plaintext
Raw Normal View History

2020-11-18 12:44:46 +01:00
#!/bin/bash
if (command -v kubectl &> /dev/null)
2020-11-18 12:44:46 +01:00
then
# create a quick alias
alias k=kubectl
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
complete -o default -F __start_kubectl ks
2020-11-18 12:44:46 +01:00
fi