summaryrefslogtreecommitdiff
path: root/cli/file_watcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/file_watcher.rs')
-rw-r--r--cli/file_watcher.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/file_watcher.rs b/cli/file_watcher.rs
index 84b30dfd2..b2d2ee15a 100644
--- a/cli/file_watcher.rs
+++ b/cli/file_watcher.rs
@@ -21,6 +21,7 @@ use tokio::select;
use tokio::sync::mpsc;
use tokio::time::sleep;
+const CLEAR_SCREEN: &str = "\x1B[2J\x1B[1;1H";
const DEBOUNCE_INTERVAL: Duration = Duration::from_millis(200);
struct DebouncedReceiver {
@@ -90,6 +91,8 @@ where
paths_to_watch,
result,
} => {
+ // Clear screen first
+ eprint!("{}", CLEAR_SCREEN);
info!(
"{} File change detected! Restarting!",
colors::intense_blue("Watcher"),
@@ -156,6 +159,10 @@ where
}
};
+ // Clear screen first
+ eprint!("{}", CLEAR_SCREEN);
+ info!("{} {} started.", colors::intense_blue("Watcher"), job_name,);
+
loop {
let watcher = new_watcher(&paths_to_watch, sender.clone())?;