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.
This commit is contained in:
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…
Reference in a new issue