From 5ec0eadea61b9716eb6af613a91fe76769ab07d0 Mon Sep 17 00:00:00 2001 From: andrewvious <106849954+andrewvious@users.noreply.github.com> Date: Wed, 7 Aug 2024 14:07:06 -0500 Subject: [PATCH] Add support for `clear` env variable (#13) Ref #9 Adds script support for the `clear` env variable --- nix-watch.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix-watch.nix b/nix-watch.nix index e78363d..b822002 100644 --- a/nix-watch.nix +++ b/nix-watch.nix @@ -216,6 +216,10 @@ let ignore_patterns="[''${IGNORE_PATTERNS[@]}]" debug "The following patterns will be ignored: ''${ANSI_BLUE}$ignore_patterns''${ANSI_RESET}" + if [[ "$CLEAR" == false && -n "$NIX_WATCH_CLEAR" ]]; then + CLEAR=$(convert_int_to_bool $NIX_WATCH_CLEAR) + fi + if [[ "$DEBUG" == false && -n "$NIX_WATCH_DEBUG" ]]; then DEBUG=$(convert_int_to_bool $NIX_WATCH_DEBUG) fi