Skip to content

Commit

Permalink
Get rid of punctuation in upstream status
Browse files Browse the repository at this point in the history
  • Loading branch information
apauley committed Jul 26, 2016
1 parent d1b08c3 commit 8f57f3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion TODO.org
@@ -1,4 +1,5 @@
* Get rid of punctuation in upstream status
* DONE Get rid of punctuation in upstream status
CLOSED: [2016-07-09 Sat 21:29]
** , ' .
* DONE Display local time
CLOSED: [2016-07-09 Sat 20:25]
Expand Down
3 changes: 2 additions & 1 deletion app/Main.hs
Expand Up @@ -48,7 +48,8 @@ upstreamColour txt = if upToDate then cyanFG txt else lightRedFG txt
gitStatusUpstream :: Shell Text
gitStatusUpstream = do
let searchText = "Your branch "
sed (searchText *> return "") $ grep (prefix searchText) (git "status" ["--long"])
let st = sed (searchText *> return "") $ grep (prefix searchText) (git "status" ["--long"])
sed ((choice [",", ".", "'"]) *> return "") st

colourOrEmpty :: (Text -> Text) -> Shell Text -> IO Text
colourOrEmpty colourFun shellText = do
Expand Down

0 comments on commit 8f57f3a

Please sign in to comment.