fswatch icon indicating copy to clipboard operation
fswatch copied to clipboard

Using fswatch without recursion option fires for files in subdirectories

Open beesperester opened this issue 5 years ago • 1 comments

I am using this command to watch changes to my cwd for files ending in .py and for the sake of this example simply echoing the resulting file path. Since I am not providing the -r option I would expect that only files which are direct children of my cwd will be echoed, but it still will fire for .py files in subdirectories of my cwd.

OS: macOS 10.15.7

fswatch --exclude ".*" --include "\.py$" --verbose ./ | while read f ; do echo $f; done

beesperester avatar Jan 14 '21 09:01 beesperester

FYI, the manual states under 4.14 Recursive Scanning:

The semantics of the (--recursive, -r) option is: recursively scan subdirectories. However, implementations may silently add ‘if the monitor does not do so already’. Since each monitor uses a different API, its behaviour depends on that of the backing API, and it is monitor-specific.

Feuermurmel avatar Jan 15 '21 21:01 Feuermurmel