mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 03:21:30 +01:00
zsh: watch_file: exit when input file does not exist
This commit is contained in:
parent
0be5c5f39e
commit
101e4fe00c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user