Skip to content

Instantly share code, notes, and snippets.

@dudash
Created July 17, 2020 01:34
Show Gist options
  • Select an option

  • Save dudash/0d7b5ad06bd5be9ff5b752f33db5010f to your computer and use it in GitHub Desktop.

Select an option

Save dudash/0d7b5ad06bd5be9ff5b752f33db5010f to your computer and use it in GitHub Desktop.
# kubeps1 custom config (on off with kubeon and kubeoff)
# https://github.com/jonmosco/kube-ps1
source "/usr/local/opt/kube-ps1/share/kube-ps1.sh"
function get_cluster_short() {
echo "$1" | cut -d / -f2 | cut -d : -f1
}
KUBE_PS1_BINARY=oc
KUBE_PS1_CLUSTER_FUNCTION=get_cluster_short
PS1='$(kube_ps1)'$PS1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment