blob: 437ecdb74192ff9011065ebbb78670135afdc03b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/// Gets the default pager based on environment variables.
///
/// The function checks the JV_PAGER environment variable
/// and returns its value if it is set. If the variable is not set,
/// it returns "less" as the default pager.
///
/// # Returns
/// A String containing the default pager
pub fn get_default_pager() -> String {
if let Ok(pager) = std::env::var("JV_PAGER") {
return pager;
}
"less".to_string()
}
|