mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Rollup merge of #133196 - omnivagant:correct-less-r-flag, r=tgross35
Make rustc --explain compatible with BusyBox less 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:
commit
cd36973a13
@ -577,7 +577,7 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) {
|
|||||||
let mut cmd = Command::new(&pager_name);
|
let mut cmd = Command::new(&pager_name);
|
||||||
// FIXME: find if other pagers accept color options
|
// FIXME: find if other pagers accept color options
|
||||||
let mut print_formatted = if pager_name == "less" {
|
let mut print_formatted = if pager_name == "less" {
|
||||||
cmd.arg("-r");
|
cmd.arg("-R");
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
["bat", "catbat", "delta"].iter().any(|v| *v == pager_name)
|
["bat", "catbat", "delta"].iter().any(|v| *v == pager_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user