Conversation
| # Watch all files in the current directory | ||
|
|
||
| while cfile=$(inotifywait --quiet --format '%w%f' --event close_write,move_self --exclude '\.git' -r .); do | ||
| while cfile=$( "${watch_all_cmd[@]}" | head -n1 ); do |
There was a problem hiding this comment.
Even with the -1 flag fswatch sometimes still outputs multiple changes at once. It seems sensible enough to just print out one of the changed files.
|
Thank you for your contribution! I can confirm that it works on Linux, but there seems to be a tiny change in behavior when the watched file/directory is removed. Apparently, the "File '…' was deleted, waiting for it to reappear .." feature is currently broken on With your PR however, the behavior is different: If I run in one terminal and then It doesn't ever come back because Unrelated from the issue above: why did you choose to use a bash array instead of bash functions (for example)? Just curious. |
|
closing for now (cleaning up list of open PRs). |
This should do the trick. I've tested the Mac version, but unfortunately don't have a linux machine to test with so you may just want to double check that it still works 👍