Library for creating command-line interfaces (colors, menus, etc.) https://github.com/pjones/byline
|Latest on Hackage:||184.108.40.206|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Byline simplifies writing interactive command-line applications by
haskeline. This makes it
possible to print messages and prompts that include terminal escape
sequences (such as setting text colors) that are automatically
disabled when standard input is a file. It also means that Byline
works on both POSIX-compatible systems and on Windows.
The primary features of Byline include printing messages, prompting
for input, and generating custom menus. It was inspired by the
highline Ruby library and the
terminal library by Craig Roche.
example :: MonadByline m => m Text example = do sayLn ("Hey, I like " <> ("Haskell" <> fg magenta) <> "!") let question = "What's " <> ("your" <> bold) <> " favorite " <> ("language" <> fg green <> underline) <> "? " askLn question (Just "Haskell")