summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Plisko <cyril.plisko@mountall.com>2017-07-05 09:46:42 +0300
committerCyril Plisko <cyril.plisko@mountall.com>2017-07-05 09:46:42 +0300
commitc43f7478feb99db21f03d41ce670584a95860731 (patch)
tree5c86ff5e02bb4f500b25df319c5a87a6ecf6836b
parent369490de8ad7e825e53cde5a38ca27f812f99b74 (diff)
Update README.md
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2dcd12b..dd19f3b 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,21 @@ If no suitable pager found `setup()` does nothing and your executable keeps
running as usual. `Pager` cleans after itself and doesn't leak resources in
case of setup failure.
+Alternatively you can specify directly the desired pager command, exactly
+as it would appear in PAGER environment variable. This is useful if you
+need some specific pager and/or flags (like "less -r") and would like to
+avoid forcing your consumers into modifying their existing PAGER
+configuration just for your application.
+
+```rust
+extern crate pager;
+use pager::Pager;
+fn main() {
+ Pager::with_pager("less -r").setup();
+ // The rest of your program goes here
+}
+```
+
If you need to disable pager altogether set environment variable `NOPAGER`
and Pager::setup() will skip initialization. The host application will continue
as normal. Pager::is_on() will reflect the fact that no Pager is active.