Add automatic kubectl completion
This commit is contained in:
parent
10b8ddb1f2
commit
1d6dab2107
@ -81,6 +81,19 @@ if has pip; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
if has kubectl; then
|
||||||
|
case "$_baseshell" in
|
||||||
|
*bash)
|
||||||
|
if ! [ -f "$HOME/.kubectl-completion-bash" ]; then
|
||||||
|
kubectl completion bash > "$HOME/.kubectl-completion-bash"
|
||||||
|
echo ".profile: Created kubectl completion for bash"
|
||||||
|
fi
|
||||||
|
. "$HOME/.kubectl-completion-bash"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
# Set up go, if we have it
|
# Set up go, if we have it
|
||||||
if has go; then
|
if has go; then
|
||||||
|
Loading…
Reference in New Issue
Block a user