mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-14 20:59:47 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
25
tldr/watchexec
Normal file
25
tldr/watchexec
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# watchexec
|
||||
|
||||
> Run arbitrary commands when files change.
|
||||
> More information: <https://github.com/watchexec/watchexec>.
|
||||
|
||||
- Call `ls -la` when any file in the current directory changes:
|
||||
|
||||
`watchexec {{ls -la}}`
|
||||
|
||||
- Run `make` when any JavaScript, CSS and HTML file in the current directory changes:
|
||||
|
||||
`watchexec --exts {{js,css,html}} make`
|
||||
|
||||
- Run `make` when any file in the `lib` or `src` directory changes:
|
||||
|
||||
`watchexec --watch {{lib}} --watch {{src}} {{make}}`
|
||||
|
||||
- Call/restart `my_server` when any file in the current directory changes, sending `SIGKILL` to stop the child process:
|
||||
|
||||
`watchexec --restart --stop-signal {{SIGKILL}} {{my_server}}`
|
||||
Reference in New Issue
Block a user