Last active
June 5, 2018 12:56
-
-
Save andrewwippler/ce7ad59b5d0eab0c2f9bc81e07b4ec14 to your computer and use it in GitHub Desktop.
This file contains 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
function _kube_ns() { | |
KUBE=`kubectl config view --minify --output 'jsonpath={..namespace}'` | |
if [ ! "${KUBE}" == "default" ] | |
then | |
echo "⎈ ${KUBE}" | |
else | |
echo "" | |
fi | |
} | |
function custom_prompt() { | |
PS1="\u@\h \w `_kube_ns` \$ " | |
} | |
PROMPT_COMMAND=custom_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment