1import Control.Applicative ((<|>))
2import Control.Monad (forM_)
3import System.Environment (getArgs)
4import qualified Data.Attoparsec.Char8 as A
5import qualified Data.ByteString.Char8 as B
6import qualified Text.Parsec as P
7import qualified Text.Parsec.ByteString as P
11 forM_ args $ \arg -> do
12 input <- B.readFile arg
13 case A.parse p input `A.feed` B.empty of
14 A.Done _ xs -> print (length xs)
17 slow = A.many (A.many1 A.letter_ascii <|> A.many1 A.digit)
18 fast = A.many (A.takeWhile1 isLetter <|> A.takeWhile1 isDigit)
19 isDigit c = c >= '0' && c <= '9'
20 isLetter c = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
25 forM_ args $ \arg -> do
27 case P.parse (P.many (P.many1 P.letter P.<|> P.many1 P.digit)) "" input of
29 Right xs -> print (length xs)
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