hwatch
======
hwatch - alternative watch command.
## Description
`hwatch` is a alternative **watch** command.
That records the result of command execution and can display it history and diffs.
### Features
- Can keep the history when the difference, occurs and check it later.
- Can check the difference in the history. The display method can be changed in real time.
- Can output the execution result as log (json format).
- Custom keymaps are available.
- Support ANSI color code.
- Execution result can be scroll.
- Not only as a TUI application, but also to have the differences output as standard output.
- If a difference occurs, you can have the specified command additionally executed.
## Install
### macOS (brew)
brew install hwatch
### macOS (MacPorts)
sudo port install hwatch
### Arch Linux (AUR)
paru -S hwatch
### Cargo Install
cargo install hwatch
## Usage
### Command
$ hwatch --help
A modern alternative to the watch command, records the differences in execution results and can check this differences at after.
Usage: hwatch [OPTIONS] [command]...
Arguments:
[command]...
Options:
-b, --batch output execution results to stdout
-B, --beep beep if command has a change result
--border Surround each pane with a border frame
--with-scrollbar When the border option is enabled, display scrollbar on the right side of watch pane.
--mouse enable mouse wheel support. With this option, copying text with your terminal may be harder. Try holding the Shift key.
-c, --color interpret ANSI color and style sequences
-r, --reverse display text upside down.
-C, --compress Compress data in memory. Note: If the output of the command is small, you may not get the desired effect.
-t, --no-title hide the UI on start. Use `t` to toggle it.
-N, --line-number show line number
--no-help-banner hide the "Display help with h key" message
-x, --exec Run the command directly, not through the shell. Much like the `-x` option of the watch command.
-O, --diff-output-only Display only the lines with differences during `line` diff and `word` diff.
-A, --aftercommand Executes the specified command if the output changes. Information about changes is stored in json format in environment variable ${HWATCH_DATA}.
-l, --logfile [] logging file. if a log file is already used, its contents will be read and executed.
-s, --shell shell to use at runtime. can also insert the command to the location specified by {COMMAND}. [default: "sh -c"]
-n, --interval seconds to wait between updates [default: 2]
-L, --limit Set the number of history records to keep. only work in watch mode. Set `0` for unlimited recording. (default: 5000) [default: 5000]
--tab-size Specifying tab display size [default: 4]
-d, --differences [] highlight changes between updates [possible values: none, watch, line, word]
-o, --output [