From d11fc107bc05bb196cf553d2020a572ab62ae0fe Mon Sep 17 00:00:00 2001 From: Waled Khatiz Date: Sat, 24 May 2025 03:46:14 +1000 Subject: [PATCH] watchman: update main page (#16489) Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages/common/watchman.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pages/common/watchman.md b/pages/common/watchman.md index a8e43171c8..aa6549b68f 100644 --- a/pages/common/watchman.md +++ b/pages/common/watchman.md @@ -3,9 +3,9 @@ > A service that watches files, and triggers actions when changes occur. > More information: . -- Start watching a directory for changes: +- Infer the root directory of the project containing the specified directory, and watch its files and sub-folders for changes: -`watchman watch {{path/to/directory}}` +`watchman watch-project {{path/to/directory}}` - Add a trigger to run a command when files with a specified filename pattern in a watched directory change: @@ -15,10 +15,14 @@ `watchman watch-list` -- Delete a watch on a directory: +- Delete a watch on a directory and its associated triggers: `watchman watch-del {{path/to/watched_directory}}` +- Delete all watched directories and triggers: + +`watchman watch-del-all` + - List all triggers on a watched directory: `watchman trigger-list {{path/to/watched_directory}}` @@ -26,3 +30,7 @@ - Delete a trigger from a watched directory: `watchman trigger-del {{path/to/watched_directory}} {{trigger_name}}` + +- Temporarily stop `watchman`, until the next time you call a `watchman` command: + +`watchman shutdown-server`