diff options
author | Cyril Plisko <cyril.plisko@mountall.com> | 2018-09-26 11:30:34 +0300 |
---|---|---|
committer | Cyril Plisko <cyril.plisko@mountall.com> | 2018-09-26 11:30:34 +0300 |
commit | 0aa68c4ab91e2a58d448c9c89a16721eb8b89ffc (patch) | |
tree | 9868e051135857205479457c48cf37b82d00a91e | |
parent | 3752c41786dc1a254c70c5deeb719cd404701573 (diff) |
Add documentation for Pager::with_default_pager()
-rw-r--r-- | src/lib.rs | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 //! } //! ``` |