Permalink
Browse files

actually use PAGER

  • Loading branch information...
1 parent 2cd31e6 commit ad31a854fcf86c1d8a11f1ea15d2cb3c7db2ccd3 @mikeplus64 committed Dec 15, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 ghc-core.hs
View
@@ -128,11 +128,11 @@ main = do
showInPager :: FilePath -> IO ExitCode
showInPager file = do
- pager <- maybe "less -R" (addOpts . words) <$> getEnvMaybe "PAGER"
+ pager <- maybe "less -R" (maybeAddOpts . words) <$> getEnvMaybe "PAGER"
system (pager ++ " " ++ file)
where
- addOpts ("less":opts) | "-R" `elem` opts = unwords ("less":opts)
- addOpts _ = "less -R"
+ maybeAddOpts ("less":opts) | "-R" `elem` opts = unwords ("less":opts)
+ maybeAddOpts pager = unwords pager
--
-- Clean up the output with some regular expressions.

0 comments on commit ad31a85

Please sign in to comment.