From 1973fc4fb5e66a9812ce60112efb212f3b027ea9 Mon Sep 17 00:00:00 2001 From: Olivier Verdier Date: Fri, 30 Jan 2015 14:03:01 +0100 Subject: [PATCH] separate gitstatus info with space instead of "\n" --- gitstatus.py | 2 +- src/Main.hs | 2 +- zshrc.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gitstatus.py b/gitstatus.py index d14420eb..4dbfbca2 100755 --- a/gitstatus.py +++ b/gitstatus.py @@ -52,7 +52,7 @@ ahead = len([x for x in behead if x[0]=='>']) behind = len(behead) - ahead -out = '\n'.join([ +out = ' '.join([ branch, str(ahead), str(behind), diff --git a/src/Main.hs b/src/Main.hs index 7371b8ba..060b0815 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -78,7 +78,7 @@ makeStringWith s (Just ios) = (intercalate s) <$> ios stringFromStatus :: Maybe String -> IO String stringFromStatus Nothing = return "" -- error in gitstatus -stringFromStatus (Just s) = makeStringWith "\n" . stringsFromStatus $ s +stringFromStatus (Just s) = makeStringWith " " . stringsFromStatus $ s {- main -} diff --git a/zshrc.sh b/zshrc.sh index c3871bf0..cdb8b4f7 100644 --- a/zshrc.sh +++ b/zshrc.sh @@ -51,7 +51,7 @@ function update_current_git_vars() { local gitstatus="$__GIT_PROMPT_DIR/dist/build/gitstatus/gitstatus" _GIT_STATUS=`${gitstatus}` fi - __CURRENT_GIT_STATUS=("${(@f)_GIT_STATUS}") + __CURRENT_GIT_STATUS=("${(@s: :)_GIT_STATUS}") GIT_BRANCH=$__CURRENT_GIT_STATUS[1] GIT_AHEAD=$__CURRENT_GIT_STATUS[2] GIT_BEHIND=$__CURRENT_GIT_STATUS[3]