Correct the fallback instruction for how to clear the terminal on macOS: pressing Command + K
also clears scrollback. Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
ccada66324
commit
55d14faebf
|
@ -635,10 +635,12 @@ fn try_to_clear(error_blurb: &str) {
|
|||
eprintln!("Unable to clear screen: {}.", e);
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
const CLEAR: &str = "cls";
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
const CLEAR: &str = "clear";
|
||||
const HOW_TO_CLEAR: &str = "using 'cls'";
|
||||
#[cfg(target_os = "macos")]
|
||||
const HOW_TO_CLEAR: &str = "by pressing Command + K";
|
||||
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
|
||||
const HOW_TO_CLEAR: &str = "using 'clear'";
|
||||
|
||||
println!("{} using '{}'.", error_blurb, CLEAR);
|
||||
println!("{} {}.", error_blurb, HOW_TO_CLEAR);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue