Created
May 14, 2018 06:11
-
-
Save plasticine/75ec8539ce747daf0731006113bef77d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kube_context() { | |
context=$(kubectl config current-context | awk '{print toupper($0)}') | |
colour="%K{blue}" | |
[[ "$context" =~ "PRODUCTION" ]] && colour="%K{red}" | |
echo " $colour%F{black}%B \u2388 $context %b%f%k" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment