1module Main (main) where
3import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))
5import Data.Function ((&))
7import qualified Streamly.Prelude as S
8import qualified Streamly.Internal.Prelude as S
9import qualified Streamly.Internal.FileSystem.Dir as Dir
11-- | List the current directory recursively using concurrent processing
15 hSetBuffering stdout LineBuffering
16 -- XXX Fix bug in enqueueAhead when mixing serial with ahead:
17 -- (\x -> S.yield dir <> S.concatMapWith ahead recursePath x)
18 -- :: SerialT IO String
19 -- or S.cons dir . S.concatMapWith ahead recursePath
20 S.mapM_ print $ S.concatMapTreeWith async listDir
21 (S.yieldM $ return (Left "."))
26 Dir.toEither dir -- SerialT IO (Either String String)
27 & S.map (prefixDir dir) -- SerialT IO (Either String String)
29 prefixDir :: String -> Either String String -> Either String String
30 prefixDir dir (Right x) = Right $ dir ++ "/" ++ x
31 prefixDir dir (Left x) = Left $ dir ++ "/" ++ x
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