2 ms·
This is the PS1 I've been using for a long time: export PS1="\n\$(kube_ps1)\n\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[0;31m\]\$(__git_ps1)\n\$\
by res0nat0r 5y ago
This is the PS1 I've been using for a long time:
export PS1="\n\$(kube_ps1)\n\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[0;31m\]\$(__git_ps1)\n\$\[\033[00m\] "
Note it needs the git-prompt.sh script (usually comes with the bash-completion package), and the kube-ps1 script: https://github.com/jonmosco/kube-ps1 https://github.com/jonmosco/kube-ps1
It will show you the current kubernetes profile and namespace, user@host, current directory and git branch if you're in a git repo.