Implementation of the Unix watch command in go. This is for Windows users who aren't lucky enough to have it built in
and who don't want to use WSL. Will NOT run on non Windows platforms because you should be using the natively
provided watch command.
Building
go build
Command Line Options
Flag
Description
-e
Exit on non-zero return of command
-g
Exit when output changes
-n #
Interval in seconds (default 5)
-p
Try to run at precise interval
-t
Hide title bar
-x
Run with command processor (cmd.exe/pwsh.exe/powershell.exe)
Exit codes
Code
Description
1
Exit on error selected and watched command error'ed
2
Exit on change selected and watched command's output changed