1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-05 00:55:24 +02:00
tldr/pages/linux/entr.md
Marco Bonelli 2599a6de48 Refactor: change "folder" to "directory" where needed.
This commit fixes every instance in which the word "folder" is
incorrectly used instead of "directory".
2019-02-13 20:51:04 +05:30

19 lines
519 B
Markdown

# entr
> Run arbitrary commands when files change.
- Rebuild with `make` if any file in any subdirectory changes:
`{{ag -l}} | entr {{make}}`
- Rebuild and test with `make` if any `.c` source files in the current directory change:
`{{ls *.c}} | entr {{'make && make test'}}`
- Send a `SIGTERM` to any previously spawned ruby subprocesses before executing `ruby main.rb`:
`{{ls *.rb}} | entr -r {{ruby main.rb}}`
- Run a command with the changed file (`/_`) as an argument:
`{{ls *.sql}} | entr {{psql -f}} /_`