Add config for kubectl and krew
This commit is contained in:
parent
799201d887
commit
cc25e775d3
6
rc.d/krew
Normal file
6
rc.d/krew
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -d ~/.krew/bin ]
|
||||||
|
then
|
||||||
|
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||||
|
fi
|
15
rc.d/kubectl
Normal file
15
rc.d/kubectl
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user