I use entr
to run commands automatically when files change. Here’s how I use it to run tests.
Use:
ls lib/* spec/* | entr -c bin/test
Notes:
- Install:
brew install entr
-c
clears the screen before running the commandfind lib spec -name '*.rb'
works the similarly tols
, but I can’t always remember the syntaxgit ls-files
is another option for watching tracked files in a repowatchexec
is an alternative toentr
, known for being more feature-rich