Use the following commands to add the kubectl autocomplete to zsh:
mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zsh
# fromhex A52A2A | |
# fromhex "#A52A2A" | |
# BLUE_VIOLET=$(fromhex "#8A2BE2") | |
# http://unix.stackexchange.com/a/269085/67282 | |
function fromhex() { | |
hex=$1 | |
if [[ $hex == "#"* ]]; then | |
hex=$(echo $1 | awk '{print substr($0,2)}') | |
fi | |
r=$(printf '0x%0.2s' "$hex") |