| Copyright | Copyright (c) 2015, Peter Harpending. |
|---|---|
| License | BSD2 |
| Maintainer | Peter Harpending <peter@harpending.org> |
| Stability | experimental |
| Portability | Tested with GHC on Linux and FreeBSD |
| Safe Haskell | None |
| Language | Haskell2010 |
System.Pager
Description
- sendToPager :: ByteString -> IO ()
- findPager :: IO ByteString
- sendToPagerConduit :: Producer (ResourceT IO) ByteString -> IO ()
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
$PATHvariable - The user doesn't have a
lessormoreinstalled, 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.