mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-19 14:01:36 +00:00
Update cheatsheets
This commit is contained in:
25
entr
Normal file
25
entr
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# entr
|
||||
|
||||
> Run arbitrary commands when files change.
|
||||
> More information: <https://manned.org/entr>.
|
||||
|
||||
- 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}} /_`
|
||||
Reference in New Issue
Block a user