Skip to content

Instantly share code, notes, and snippets.

@rbo
Last active September 23, 2022 19:26
Show Gist options
  • Save rbo/7b510cb0268d54144270fe01ccdde749 to your computer and use it in GitHub Desktop.
Save rbo/7b510cb0268d54144270fe01ccdde749 to your computer and use it in GitHub Desktop.
powerline-go
# 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