Last active
September 23, 2022 19:26
-
-
Save rbo/7b510cb0268d54144270fe01ccdde749 to your computer and use it in GitHub Desktop.
powerline-go
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
# https://github.com/justjanne/powerline-go | |
if [ -x "$(command -v powerline-go)" ]; then | |
function _update_ps1() { | |
rc=$? | |
if [ -x "$(command -v powerline-go)" ]; then | |
PS1="$(powerline-go -error $rc -max-width 80 -newline -colorize-hostname -modules "ssh,host,user,cwd,perms,git,kube,exit" -priority "ssh,host,cwd,exit,git,kube" -modules-right "time" )" | |
else | |
PS1="\u@\h:\w $ " | |
fi | |
} | |
if [ "$TERM" != "linux" ]; then | |
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment