mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 11:31: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
|
set +m # disable job control messages
|
||||||
while true; do
|
while true; do
|
||||||
|
if [[ ! -f "$file" ]]; then
|
||||||
|
echo "File \"$file\" does not exist";
|
||||||
|
break
|
||||||
|
fi
|
||||||
zsh -c "$action" &
|
zsh -c "$action" &
|
||||||
_bg_job_pid=$!
|
_bg_job_pid=$!
|
||||||
disown
|
disown
|
||||||
|
|
Loading…
Reference in New Issue
Block a user