bonnie icon indicating copy to clipboard operation
bonnie copied to clipboard

Add ability to rerun command on directory change

Open arctic-hen7 opened this issue 3 years ago • 1 comments

Description A new command core property (lowest level, next to shell/exec specification) .watch that is provided a directory path to watch. Then, the command will be rerun whenever any file in that directory changes.

Reasoning This would make Bonnie able to easily run commands that need to watch one or more files. Quite frankly, it'd just be a useful feature. The only possible issue is that we'd need to assume the directory exists until runtime, and we'll have to check it before we run the command for the first time (on invocation) and fail fast, but that shouldn't be a problem.

Are you willing to work on an implementation of this? Yes.

arctic-hen7 avatar Jul 18 '21 09:07 arctic-hen7

Having played around a little with watching directories in Perseus, I think I'm reasonably familiar with what needs to be done for this, but it's definitely lower priority than the other open issues at the moment.

arctic-hen7 avatar Sep 03 '21 08:09 arctic-hen7