I want to watch all directories that contain source files of my app. I don't want to type -w DIR for every directory. xargs can't do this.
I'd like an option that will cause watchexec to take all watch paths from a file, one per line, just like grep -f or rsync --files-form. No need to type watchexec -w if you have the list of directories in a file.
xargs can't do this because the option -w has to be specified many times, once for each directory. The -I flag causes each command to be run with just one arg.
This works, but is not nice (Fish shell)
eval watchexec $(cat my_deps | sed -e 's/^/-w /' | sed ':a;N;s/\n/ /;ba') -- overmind restart app
I guess --watch-file would make sense, given that there's --filter/--filter-file and --ignore/--ignore-file.
As a short option, possibly -F, but I don't think a short option is needed, because this is mostly useful for automation, i.e. scripts.
I want to watch all directories that contain source files of my app. I don't want to type
-w DIRfor every directory.xargscan't do this.I'd like an option that will cause
watchexecto take all watch paths from a file, one per line, just likegrep -forrsync --files-form. No need to typewatchexec -wif you have the list of directories in a file.xargscan't do this because the option-whas to be specified many times, once for each directory. The-Iflag causes each command to be run with just one arg.This works, but is not nice (Fish shell)
I guess
--watch-filewould make sense, given that there's--filter/--filter-fileand--ignore/--ignore-file.As a short option, possibly
-F, but I don't think a short option is needed, because this is mostly useful for automation, i.e. scripts.