1module Stackage.Init (stackageInit) where
3import Data.List (isInfixOf, isPrefixOf)
5import System.FilePath ((</>))
10 let config = c </> "config"
11 orig <- readFile config
13 _ <- return $! length orig
14 writeFile config $ unlines $ go $ lines orig
18 . filter (\s -> not $ "stackage" `isInfixOf` s)
20 addStackage [] = stackageLines []
22 | "remote-repo-cache:" `isPrefixOf` l = stackageLines $ l : ls
23 | otherwise = l : addStackage ls
26 "remote-repo: stackage:http://hackage.haskell.org/packages/archive"
27 : "remote-repo: stackage-extra:http://hackage.haskell.org/packages/archive"
31 | s == "remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive" = "--" ++ s
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