fswatch
fswatch copied to clipboard
What are my monitor properties? + more undocumented
Hey :) This program looks awesome, first time user here.
On GNU/Linux, I'd like to use fswatch to monitor only writes to a file. I'd like to run a markup convertor whenever I perform a write to a README file.
It feels as if the normal fswatch -o README
shows also events which are not write because it spits a new line even if I don't write the file but moving my focus to it.
I notice there's --monitor-property name=value
but I couldn't find documentation / examples for these properties. fswatch --list-monitors
doesn't show any more information. Also, there's --format=FORMAT
which perhaps could have been useful to filter out non-write events but I couldn't find documentation for that either :/ I'm not fluent in C enough to look it up my self...
Regards.
Do you mean EVENT TYPES with the fswatch --event name argument? Probably the "Updated" type is what you want. However, I've noticed some processes do a Remove Create cycle on macos.
The actual type names are not listed in the man pages, but are mentioned in this issue/bug: #207
I'm also missing documentation for --format
.
So far I've found %f (modification type), %p (full path), %n (not sure, perhaps count?), %t (time).
Wish there was something for getting the path relative to the current directory.