I want to use fswatch to run a file through my unit test framework whenever I save.
As a test, I run fswatch and make a minor change to /my/path/test.txt in my text editor and get the output I expected:
$ fswatch . | xargs -I {} echo {} {}
/my/path/test.txt /my/path/test.txt
But if I insert a grep in the middle and repeat the process I get no output:
$ fswatch . | grep test | xargs -I {} echo {} {}
What am I doing wrong?
Edit:
fswatch + grep works fine by itself
$ fswatch . | grep test
/my/path/test.txt