diff --git a/README.md b/README.md index a9855704..1638a478 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,13 @@ Add the following to your `.bashrc` (or `.profile` on Mac): ```bash function _update_ps1() { PS1="$($GOPATH/bin/powerline-go -error $? -jobs $(jobs -p | wc -l))" + + # 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 @@ -102,6 +109,13 @@ Add the following to your `.zshrc`: ```bash function powerline_precmd() { PS1="$($GOPATH/bin/powerline-go -error $? -jobs ${${(%):%j}:-0})" + + # 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 "?" } function install_powerline_precmd() { @@ -113,7 +127,7 @@ function install_powerline_precmd() { precmd_functions+=(powerline_precmd) } -if [ "$TERM" != "linux" ]; then +if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then install_powerline_precmd fi ```