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:
Daira Hopwood 2022-03-13 18:25:40 +00:00
parent ccada66324
commit 55d14faebf
1 changed files with 6 additions and 4 deletions

View File

@ -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);
}
}