summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Plisko <cyril.plisko@mountall.com>2018-09-26 11:37:11 +0300
committerCyril Plisko <cyril.plisko@mountall.com>2018-09-26 11:37:11 +0300
commit0c09af11c21e21826672b4eca3b350c60dd62ec3 (patch)
tree10c3a80e3b282c4f235f313594c8203be0455e2e
parent61ee63368c8372b50b1470bdef275218d8ea61ab (diff)
Update README.md
-rw-r--r--README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 33b3766..48c3dad 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,20 @@ fn main() {
// The rest of your program goes here
}
```
+Also you can set alternative default (fallback) pager to be used instead of
+`more`. PAGER environment variable (if set) will still have precedence.
+
+```rust
+extern crate pager;
+
+use pager::Pager;
+
+fn main() {
+ Pager::with_default_pager("pager").setup();
+ // The rest of your program goes here
+}
+```
+
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