unison
doesn't include unison-fsmonitor
for macOS, thus -repeat watch
option doesn't work out of the box. This utility fills the gap. This implementation was originally made for macOS but shall work on other platforms as well like Linux, Windows.
brew install autozimu/homebrew-formulas/unison-fsmonitor
Alternatively if you have cargo installed,
cargo install unison-fsmonitor
Simply run unison with -repeat watch
as argument or repeat=watch
in config file.
You might need to update file watch limits in both hosts if watching limit reached. See https://facebook.github.io/watchman/docs/install#system-specific-preparation for more details.
RUST_LOG=debug unison