summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Plisko <cyril.plisko@mountall.com>2018-09-26 11:30:34 +0300
committerCyril Plisko <cyril.plisko@mountall.com>2018-09-26 11:30:34 +0300
commit0aa68c4ab91e2a58d448c9c89a16721eb8b89ffc (patch)
tree9868e051135857205479457c48cf37b82d00a91e
parent3752c41786dc1a254c70c5deeb719cd404701573 (diff)
Add documentation for Pager::with_default_pager()
-rw-r--r--src/lib.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 39d4d82..7786ea7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,6 +30,17 @@
//! }
//! ```
//!
+//! 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
+//! }
+//! ```
//! 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
@@ -40,7 +51,7 @@
//! extern crate pager;
//! use pager::Pager;
//! fn main() {
-//! Pager::with_pager("less -r").setup();
+//! Pager::with_pager("pager -r").setup();
//! // The rest of your program goes here
//! }
//! ```