diff --git a/README.md b/README.md index aec6bc3..41a6bd4 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,25 @@ Download `nightwatch` from [releases](https://github.com/jakolehm/nightwatch/rel ## Example Usage -``` +Single file: +```bash $ find *.js | nightwatch node app.js ``` +Watch everything in the current directory in a control loop: +```bash +COMMAND="bundle exec lolcat.rb" + +while true; do + if find . | nightwatch --debug --exit-on-change=255 --dir "${COMMAND}"; then + break # command wants to terminate, exit code was success + fi + + echo "Restart ${COMMAND}" + sleep 1 +done +``` + ## Building From Source ```