Skip to content

Instantly share code, notes, and snippets.

@ondratu
ondratu / kube.bash
Created July 13, 2018 10:01
Part of .bashrc
if [ -x /usr/bin/kubectl ]; then
bin_time=`stat --format="%Z" /usr/bin/kubectl`
cfg_time=`[ -f ~/.bash_kubectl ] && stat --format="%Z" ~/.bash_kubectl || echo 0`
if [ $bin_time -gt $cfg_time ]; then
/usr/bin/kubectl completion bash > ~/.bash_kubectl
fi
. ~/.bash_kubectl
fi

Keybase proof

I hereby claim:

  • I am ondratu on github.
  • I am mcbig (https://keybase.io/mcbig) on keybase.
  • I have a public key ASDJEs4P-x2hJknls-d28ZIjSqvNbEy53ApTnAYwx9bq7go

To claim this, I am signing this object:

#!/usr/bin/env python3
color_groups = [
[('red', None), ('green', None), ('yellow', None), ('magenta', None),
('cyan', None)],
[('black', 'light_red'), ('black', 'light_green'),
('black', 'light_yellow'), ('black', 'light_magenta'),
('black', 'light_cyan')]
]
cmd = ['git', 'blame', '--line-porcelain']