Make rustc --explain busybox less compatible

busybox less does not support the -r flag and less(1) says:

  USE OF THE -r OPTION IS NOT RECOMMENDED.
This commit is contained in:
omni 2024-11-18 20:35:38 +00:00
parent c602e9aeaa
commit 6f8fe7929a

View File

@ -577,7 +577,7 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) {
let mut cmd = Command::new(&pager_name);
// FIXME: find if other pagers accept color options
let mut print_formatted = if pager_name == "less" {
cmd.arg("-r");
cmd.arg("-R");
true
} else {
["bat", "catbat", "delta"].iter().any(|v| *v == pager_name)