watchman-wait(1)

πŸ’– watchman-wait(1) β€” the watchman-wait bestie πŸ’–

okay so this is the watchman-wait manual page, and it's genuinely one of my faves, no cap. it's the little tool that just... sits there. patiently. waiting for your files to do something. πŸ¦‹


✨ NAME ✨

watchman-wait β€” waits for changes to files. that's it, that's the whole job, and she does it flawlessly. πŸ’…


🌸 SYNOPSIS 🌸

watchman [-h] [--relative RELATIVE] [--fields FIELDS]
[-s SEPARATOR] [-m MAX_EVENTS] [-p PATTERN [PATTERN ...]]
[-t TIMEOUT]
path [path ...]

πŸŽ€ DESCRIPTION πŸŽ€

so bestie, watchman-wait uses the watchman service to efficiently and recursively watch your specified list of paths. recursively!! she goes all the way down the tree for you. 🌈

it is suitable for waiting for changes to files from shell scripts. like, this is literally what she was born for. 🫢

she 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 β€” main character energy, she never leaves. πŸ‘‘

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. so by the time you see them, they're already settled. she's not giving you the messy drafts, she's giving you the final cut. πŸ’…


🧚 USAGE 🧚

⭐ OPTIONAL ARGUMENTS ⭐

  • -h, --help β€” show this help message and exit. the classic. the icon. πŸŽ€
  • --relative RELATIVE β€” print paths relative to this dir (default=PWD). so like, make your paths relative to wherever you point her. πŸ“
  • --fields FIELDS β€” comma separated list of file information fields to return. the default is just the name. for a list of possible 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. default is a space, but you can make it whatever you want, bestie. go off. πŸ“
  • -m MAX_EVENTS, --max-events MAX_EVENTS β€” set the maximum number of events that will be processed. when the limit is reached, watchman-wait will exit. the default is 1. setting the limit to 0 removes the limit, causing watchman-wait to execute indefinitely. ⚠️ that's the "she lives here now" setting.
  • -p PATTERN [PATTERN ...], --pattern PATTERN [PATTERN ...] β€” only emit paths that match this list of patterns. patterns are applied by the watchman server and are matched against the root-relative paths. you will almost certainly want to use quotes around your pattern list so that your shell doesn't interpret the pattern. the pattern syntax is wildmatch style; globbing with recursive matching via '**'. πŸŒ€
for real, quote your patterns. your shell is nosy and she WILL try to help. 😭
  • -t TIMEOUT, --timeout TIMEOUT β€” exit if no events trigger within the specified timeout. if timeout is zero (the default) then keep running indefinitely. ⏰

🌟 POSITIONAL ARGUMENTS 🌟

  • path β€” path(s) to watch. one or many, she's flexible. πŸ’–

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” after successfully waiting for event(s). slay. ✨
  • 1 β€” in case of a runtime error of some kind. 😭
  • 2 β€” the -t/--timeout option was used and that amount of time passed before an event was received. ⏰
  • 3 β€” execution was interrupted (Ctrl-C). you did this. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

watchman(1), watchman-make(1)

for more information, please refer the online documentation. πŸ”₯


and that's the whole page, bestie β€” sending u off with the deets: this one's a Linux page from 8 Oct 2019, filed under watchman-wait(1). go watch some files. i'm obsessed with u. πŸ’œπŸ«Άβœ¨