watchexec
watchexec copied to clipboard
[feature request] Option to disable recursive dir watch
It would be handy to be able to avoid recursive watches on a directory. Practical as we want to watch only for changes on a directory, but not subdirectories with a lot of GB of files.
Thank you for your great work.
Have you tried -i
with glob pattern? #243
This is not about post filtering, but pre filtering what is watched, in a sense.
Yeah. This is needed if I have a dir with GBs of data files and some source files in project root that I want to pick up. For example
project/
code_1
code_2
... (imagine 100 more code files)
data/
GB upon GB of data files
Note how the only performant way to do this (which is still not really performant) is to watchexec with -w code_1 -w code_2 ...
. The solution is definitely to specify a non-recursive watch on project/
which will cause content in project/data/
to be excluded as intended.
In actual practice, this is perhaps a rare situation since any sane project layout would have the code under src/
or some such. But conceptually it's a rather big hole in the design of this CLI interface.
Released in 2.1.0