16 lines
244 B
Plaintext
16 lines
244 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
if (which kubectl &> /dev/null)
|
||
|
then
|
||
|
|
||
|
# activate completion
|
||
|
source <(kubectl completion bash)
|
||
|
|
||
|
# create a quick alias
|
||
|
alias k=kubectl
|
||
|
|
||
|
# add completion for the alias as well
|
||
|
complete -o default -F __start_kubectl k
|
||
|
|
||
|
fi
|