stack-1.3.0: The Haskell Tool Stack

Safe HaskellSafe
LanguageHaskell2010

System.Process.PagerEditor

Contents

Description

Run external pagers ($PAGER, less, more) and editors ($VISUAL, $EDITOR, nano, pico, vi).

Synopsis

Pager

pageWriter :: (Handle -> IO ()) -> IO () Source

Run pager, providing a function that writes to the pager's input.

pageByteString :: ByteString -> IO () Source

Run pager to display a lazy ByteString.

pageBuilder :: Builder -> IO () Source

Run pager to display a ByteString-Builder.

pageFile :: FilePath -> IO () Source

Run pager to display contents of a file.

pageString :: String -> IO () Source

Run pager to display a string.

Editor

editFile :: FilePath -> IO () Source

Run editor to edit a file.

editReaderWriter :: forall a. String -> (Handle -> IO ()) -> (FilePath -> IO a) -> IO a Source

Run editor, providing functions to write and read the file contents.

editByteString :: String -> ByteString -> IO ByteString Source

Run editor on a ByteString.

editString :: String -> String -> IO String Source

Run editor on a String.