diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-20T13·12+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-20T13·12+0200 |
commit | 392430b2c4ceb2e476abe2b3acc928581b2a1445 (patch) | |
tree | 30db8572f28c8def55f3b4dcce988a6ed4c778e9 /src/libmain/shared.hh | |
parent | 894fa5e42dd952caa702794964a13845ccf6f29a (diff) |
nix-store -l: Automatically pipe output into $PAGER
Diffstat (limited to 'src/libmain/shared.hh')
-rw-r--r-- | src/libmain/shared.hh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh index c74e7cbc197d..c56203daefa2 100644 --- a/src/libmain/shared.hh +++ b/src/libmain/shared.hh @@ -69,6 +69,18 @@ template<class N> N getIntArg(const string & opt, /* Show the manual page for the specified program. */ void showManPage(const string & name); +/* The constructor of this class starts a pager if stdout is a + terminal and $PAGER is set. Stdout is redirected to the pager. */ +class RunPager +{ +public: + RunPager(); + ~RunPager(); + +private: + Pid pid; +}; + extern volatile ::sig_atomic_t blockInt; } |