https://github.com/echocat/watch
Like the unix one but works cross-platform without magic. :smile:
https://github.com/echocat/watch
cli command-line-tool util watch
Last synced: 8 months ago
JSON representation
Like the unix one but works cross-platform without magic. :smile:
- Host: GitHub
- URL: https://github.com/echocat/watch
- Owner: echocat
- License: mit
- Created: 2019-01-17T10:25:29.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-01-15T09:01:12.000Z (over 1 year ago)
- Last Synced: 2025-03-26T06:34:27.973Z (over 1 year ago)
- Topics: cli, command-line-tool, util, watch
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# watch
> Like the unix one but works cross-platform without magic.
## Install
```
$ go install github.com/echocat/watch@latest
```
## Usage
```
usage: watch [] ...
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:
The command to be executed.
```
## Examples
```
$ watch kubectl -n foobar get pods
```