Skip to content
/ watch Public

Like the unix one but works cross-platform without magic. 😄

License

Notifications You must be signed in to change notification settings

echocat/watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

watch

Like the unix one but works cross-platform without magic.

Install

$ go install github.com/echocat/watch@latest

Usage

usage: watch [<flags>] <command>...

Like the unix one but works cross-platform without magic.

Flags:
      --help                     Show context-sensitive help (also try
                                 --help-long and --help-man).
  -e, --exitCodes=EXITCODES ...  List of exit codes to leads to a next
                                 execution. Empty means always continue.
  -s, --successExitCodes=0 ...   List of exit codes that indicates successful
                                 execution.
  -n, --interval=5s              Execute every n duration.
  -r, --resetTerminal            If enabled before each execution the terminal
                                 will be reset.
      --timeFormat="2006-01-02 15:04:05"
                                 How to format the time. See:
                                 https://golang.org/pkg/time/
  -c, --colored=auto             "auto" - Will decide the best option | "always"
                                 - Will always use colors | "never" - Will never
                                 use colors
      --version                  Will print information about this version.
  -h, --header=[{{.Now}}] Execute [{{.Command}}] every {{.Interval}}

                                 Will print a header what will be executed. If
                                 empty no header will be displayed. See:
                                 https://golang.org/pkg/text/template/
  -t, --footer=[{{.Now}}] {{.Command.ResultSummary}}

                                 Will print a footer what was executed. If empty
                                 no footer will be displayed. See:
                                 https://golang.org/pkg/text/template/

Args:
  <command>  The command to be executed.

Examples

$ watch kubectl -n foobar get pods