diff options
author | Cyril Plisko <cyril.plisko@mountall.com> | 2018-09-26 11:37:11 +0300 |
---|---|---|
committer | Cyril Plisko <cyril.plisko@mountall.com> | 2018-09-26 11:37:11 +0300 |
commit | 0c09af11c21e21826672b4eca3b350c60dd62ec3 (patch) | |
tree | 10c3a80e3b282c4f235f313594c8203be0455e2e | |
parent | 61ee63368c8372b50b1470bdef275218d8ea61ab (diff) |
Update README.md
-rw-r--r-- | README.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 |