watch: clears terminal before entering loop

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.
pull/227/head
Jubilee Young 5 years ago
parent 79a569422c
commit 83be517e77

@ -80,6 +80,9 @@ fn main() {
}
if matches.subcommand_matches("watch").is_some() {
/* Clears the terminal with an ANSI escape code.
Works in UNIX and newer Windows terminals. */
println!("\x1Bc");
watch(&exercises).unwrap();
}

Loading…
Cancel
Save