From ea141a6891c2d751b1e0299d5e509858d54b24d6 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 14 May 2024 16:39:16 -0700 Subject: [PATCH] Document how to use watchexec to re-run recipes when files change (#2036) --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 031ad3b..dc6df4d 100644 --- a/README.md +++ b/README.md @@ -3047,12 +3047,19 @@ can also be used to make a `just` binary print its changelog. Miscellanea ----------- -### Companion Tools +### Re-running recipes when files change -Tools that pair nicely with `just` include: +[`watchexec`](https://github.com/mattgreen/watchexec) can re-run any command +when files change. -- [`watchexec`](https://github.com/mattgreen/watchexec) — a simple tool that - watches a path and runs a command whenever it detects modifications. +To re-run the recipe `foo` when any file changes: + +```sh +watchexec just foo +``` + +See `watchexec --help` for more info, including how to specify which files +should be watched for changes. ### Shell Alias