diff --git a/pages/common/entr.md b/pages/common/entr.md index 5f5624e6ab..09b4747ea1 100644 --- a/pages/common/entr.md +++ b/pages/common/entr.md @@ -1,7 +1,7 @@ # entr > Run arbitrary commands when files change. -> More information: . +> More information: . - Rebuild with `make` if any file in any subdirectory changes: @@ -18,3 +18,15 @@ - Run a command with the changed file (`/_`) as an argument: `{{ls *.sql}} | entr {{psql -f}} /_` + +- [c]lear the screen and run a query after the SQL script is updated: + +`{{echo my.sql}} | entr -cp {{psql -f}} /_` + +- Rebuild the project if source files change, limiting output to the first few lines: + +`{{find src/}} | entr -s {{'make | sed 10q'}}` + +- Launch and auto-[r]eload a Node.js server: + +`{{ls *.js}} | entr -r {{node app.js}}`