Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 922 Bytes

powerline prompt theme.md

File metadata and controls

39 lines (26 loc) · 922 Bytes

change prompt theme to powerline

Download and install go latest

https://go.dev/doc/install

Add these lines to the bottom of your .bashrc file

# golang env vars

export PATH=$PATH:/usr/local/go/bin
export GOPATH=~/go

Install powerline-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