Skip to content

Commit

Permalink
separate gitstatus info with space instead of "\n"
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierverdier committed Jan 31, 2015
1 parent 343f41a commit 1973fc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gitstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}

Expand Down
2 changes: 1 addition & 1 deletion zshrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 1973fc4

Please sign in to comment.