cli-extras-0.2.0.0: Miscellaneous utilities for building and working with command line interfaces
Safe HaskellSafe
LanguageHaskell2010

Cli.Extras.TerminalString

Description

Types and functions dealing with strings to be printed on terminal.

Synopsis

Documentation

render Source #

Arguments

:: Bool

with color

-> Maybe Int

optionally, trim to maximum width

-> [TerminalString] 
-> Text 

putStrWithSGR :: MonadIO m => [SGR] -> Handle -> Bool -> Text -> m () Source #

Safely print the string with the given ANSI control codes, resetting in the end.

enquiryCode :: String Source #

Code for https://en.wikipedia.org/wiki/Enquiry_character. On VT-100 descendants (most modern UNIX terminal emulators), an ENQ character can be generated by pressing Ctrl+E.