From dedc2c03aafa1018123cdec993d18c1dd8e0fe43 Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Wed, 6 Jan 2021 17:06:28 +0100 Subject: [PATCH] Clarify the Readme a bit --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 ```