Site Tools


entr

entr cheatsheet

  • -c – Clear screen
  • -d – Track directories that do not start with ., new file causes entr to stop, so wrap it with while loop
  • -p – delay execution until files change event
  • -r – Kill previously run command before executing command
  • -s – Use shell on first argument
reload nodejs app
ls *.js | entr -c -r node app.js
Rebuild project if a source file is modified or added to the src/ directory
# bash
while true; do find ./src -iname '*.js' | entr -d node app.js; done

# fish
while true; find . -iname "*.py" | entr -rdc poetry run test; end

references:

entr.txt · Last modified: 2020-09-16 by dcai