NAME
watchman-wait - waits for changes to files.
SYNOPSIS
watchman [-h] [--relative RELATIVE] [--fields FIELDS]
[-s SEPARATOR] [-m MAX_EVENTS] [-p PATTERN [PATTERN ...]]
[-t TIMEOUT]
path [path ...]
DESCRIPTION
watchman-wait uses the watchman service to efficiently and recursively watch your specified list of paths.
It is suitable for waiting for changes to files from shell scripts.
It can stop after a configurable number of events are observed. The default is a single event. You may also remove the limit and allow it to execute continuously.
watchman-wait will print one event per line. The event information includes your specified list of fields, with each field separated by a space (or your choice of --separator).
Events are consolidated and settled by the watchman server before they are dispatched to watchman-wait.
USAGE
OPTIONAL ARGUMENTS
-h, --help
-
show this help message and exit
--relative RELATIVE
-
print paths relative to this dir (default=PWD)
--fields FIELDS
-
Comma separated list of file information fields toreturn. The default is just the name. For a list ofpossible fields, see: https://facebook.github.io/watchman/docs/cmd/query.html#available-fields
-s SEPARATOR, --separator SEPARATOR
-
String to use as field separator for event output.
-m MAX_EVENTS, --max-events MAX_EVENTS
-
Set the maximum number of events that will be processed. When the limitis reached, watchman-wait will exit. The default is 1. Setting the limitto 0 removes the limit, causing watchman-wait to execute indefinitely.
-p PATTERN [PATTERN ...], --pattern PATTERN [PATTERN ...]
-
Only emit paths that match this list of patterns. Patterns areapplied by the watchman server and are matched against the root-relativepaths. You will almost certainly want to use quotes around your patternlist so that your shell doesn't interpret the pattern. The pattern syntaxis wildmatch style; globbing with recursive matching via '**'.
-t TIMEOUT, --timeout TIMEOUT
-
Exit if no events trigger within the specified timeout. If timeoutis zero (the default) then keep running indefinitely.
POSITIONAL ARGUMENTS
path
-
path(s) to watch
EXIT STATUS
0
-
After successfully waiting for event(s)
1
-
In case of a runtime error of some kind
2
-
The -t/--timeout option was used and that amount of time passed beforean event was received
3
-
Execution was interrupted (Ctrl-C)
SEE ALSO
For more information, please refer the online documentation ⟨http://facebook.github.io/watchman/docs/cli-options.html⟩