diff --git a/functions/misc.zsh b/functions/misc.zsh index 32b711a..aeb6001 100755 --- a/functions/misc.zsh +++ b/functions/misc.zsh @@ -316,6 +316,10 @@ function watch_file() { { set +m # disable job control messages while true; do + if [[ ! -f "$file" ]]; then + echo "File \"$file\" does not exist"; + break + fi zsh -c "$action" & _bg_job_pid=$! disown