mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-14 12:15:40 +02:00
entr: add page (#2613)
This commit is contained in:
parent
bb06748ab3
commit
d69bda7c13
1 changed files with 19 additions and 0 deletions
19
pages/linux/entr.md
Normal file
19
pages/linux/entr.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# entr
|
||||
|
||||
> Run arbitrary commands when files change.
|
||||
|
||||
- Rebuild with `make` if any files in any subfolders change:
|
||||
|
||||
`{{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}} /_`
|
Loading…
Add table
Reference in a new issue