Skip to main content

select_page

Function select_page 

Source
pub fn select_page<'a>(
    pages: &'a BTreeMap<String, String>,
    pkg_name: &str,
    requested: Option<&str>,
) -> Result<(&'a String, &'a String)>
Expand description

Picks which manual page to display.

An explicit --page value matches a page file name exactly (e.g. zbsdiff.3). Without it, the <package>.1 page is preferred; a lone page is used directly regardless of its name.

ยงErrors

Returns an error if the requested page does not exist, or if no page can be chosen by default. The error lists the available pages.