1{-# LANGUAGE BangPatterns #-}
3module Main (main) where
5import Control.Applicative
6import Control.Exception (bracket)
7import Control.Monad (forM_)
8import Data.Attoparsec.ByteString
10import System.Environment
12import qualified Data.ByteString.Char8 as B
14refill :: Handle -> IO B.ByteString
15refill h = B.hGet h (80*1024)
17listy :: FilePath -> Handle -> IO ()
19 r <- parseWith (refill h) (many request) =<< refill h
21 Fail _ _ msg -> hPutStrLn stderr $ file ++ ": " ++ msg
22 Done _ reqs -> print (length reqs)
24incrementy :: FilePath -> Handle -> IO ()
25incrementy file h = go (0::Int) =<< refill h
28 r <- parseWith (refill h) request is
30 Fail _ _ msg -> hPutStrLn stderr $ file ++ ": " ++ msg
37 | otherwise -> go (n+1) bs
43 bracket (openFile arg ReadMode) hClose $
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list