Skip to content

Instantly share code, notes, and snippets.

@IuryAlves
Created June 2, 2022 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IuryAlves/4178677885609cb60e5ffd5336f65d51 to your computer and use it in GitHub Desktop.
Save IuryAlves/4178677885609cb60e5ffd5336f65d51 to your computer and use it in GitHub Desktop.
prompt_kubectl() {
currentCluster=$(kubectx -c 2>/dev/null)
currentNamespace=$(kubens -c 2>/dev/null)
if test -n "$currentCluster"; then
prompt_segment yellow black "kubernetes($currentCluster:$currentNamespace)"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment