pager-0.1.0.0: Open up a pager, like 'less' or 'more'

CopyrightCopyright (c) 2015, Peter Harpending.
LicenseBSD2
MaintainerPeter Harpending <peter@harpending.org>
Stabilityexperimental
PortabilityTested with GHC on Linux and FreeBSD
Safe HaskellNone
LanguageHaskell2010

System.Pager

Description

 

Synopsis

Documentation

sendToPager :: ByteString -> IO () Source

Send a lazy ByteString to the user's $PAGER.

findPager :: IO ByteString Source

This finds the user's $PAGER. This will fail if:

  • There is no $PATH variable
  • The user doesn't have a less or more installed, and hasn't specified an alternate program via $PAGER.

sendToPagerConduit :: Producer (ResourceT IO) ByteString -> IO () Source

This is what sendToPager uses on the back end. It takes a Producer, from Data.Conduit, and then sends the produced bytes to the pager's stdin.