Add these lines to the bottom of your .bashrc file
# golang env vars
export PATH=$PATH:/usr/local/go/bin
export GOPATH=~/go
go install github.com/justjanne/powerline-go@latest
Add these lines to the bottom of your .bashrc file
# powerline-go setup
function _update_ps1() {
PS1="$($GOPATH/bin/powerline-go -error $? -jobs $(jobs -p | wc -l) -mode flat)"
# Uncomment the following line to automatically clear errors after showing
# them once. This not only clears the error for powerline-go, but also for
# everything else you run in that shell. Don't enable this if you're not
# sure this is what you want.
#set "?"
}
if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi