.\" Automatically generated by Pandoc 3.1.13 .\" .TH "hwatch" "1" "" "Version 0.3.13" "A modern alternative to the watch command, records the differences in execution results and can check this differences at after." .SH NAME \f[B]hwatch\f[R] \- A modern alternative to the watch command, records the differences in execution results and can check this differences at after. .SH SYNOPSIS .PP \f[B]hwatch\f[R] [\f[I]options\f[R]] \f[I]command\f[R] .SH DESCRIPTION \f[B]hwatch\f[R] is like \f[I]watch\f[R] command, repeatedly executes a \f[I]command\f[R] and displays its output. However, the output results can be scrolled and displayed. In addition, the difference of the execution result is recorded with the time stamp, and it can be checked later. When checking, it is also possible to display the diff with the previous difference together. .PP If you specify it with options, the execution result can be recorded as a log with json. .SS Flags .TP \-h, \-\-help Prints help information .TP \-V, \-\-version Prints version information .TP \-b, \-\-batch Output execution results to stdout. NOTE: Operations with TUI are not possible in batch mode. .TP \-B, \-\-beep beep if command has a change result. .TP \-\-mouse enable mouse wheel support. With this option, copying text with your terminal may be harder. Try holding the Shift key. .TP \-c, \-\-color Interpret ANSI colors and style sequences and display in color. It can be changed later by key binding. .TP \-r, \-\-reverse Display text upside down. .TP \-t, \-\-no\-title Hide the UI on start. Use \f[CR]t\f[R] to toggle it. .TP \-N, \-\-line\-number Show line number. .TP \-\-no\-help\-banner Hide the \[lq]Display help with h key\[rq] message .TP \-e, \-\-exec Run the command directly, not through the shell. Much like the \f[CR]\-x\f[R] option of the watch command. .TP \-O, \-\-diff\-output\-only Display only the lines with differences during \f[CR]line\f[R] diff and \f[CR]word\f[R] diff. .SS Options .TP \-A, \-\-aftercommand \f[I]command to execute after difference occurs\f[R] Executes the specified command if the output changes. Information about changes is stored in json format in environment variable \f[CR]${HWATCH_DATA}\f[R]. .TP \-l, \-\-logfile \f[I]logfile\f[R] Output the command execution result and its time as a log in json. The execution results that are recorded are only those that differ from the previous execution results. .TP \-s, \-\-shell \f[I]shell command\f[R] shell to use at runtime. can also insert the command to the location specified by {COMMAND}. .TP \-n, \-\-interval \f[I]seconds\f[R] Specify update interval. The command will not allow quicker than \f[B]0.001\f[R] second interval, in which the smaller values are converted. Both `.' and `,' work for any locales. .TP \-\-tab\-size \f[I]num\f[R] Specifying tab display size. default 4 char. .TP \-d, \-\-differences \f[I][none, watch, line, word]\f[R] set diff mode. highlight changes between updates. If only \f[CR]\-d\f[R] is specified, it will be a watch diff. .RS .PP \f[I]plane\f[R] \&... Do not show diff (default). .PP \f[I]watch\f[R] \&... Diff like watch command. Specifying the \f[I]\-d\f[R] option applies this mode. .PP \f[I]line\f[R] \&... Can be done diff in line units. .PP \f[I]word\f[R] \&... Can be done diff in line word units. .RE .TP \-o, \-\-output set output mode. If you specify the output mode, the history pane will also display only the history where the specified output mode has changed. .SS Configuration If you always want to use some command\-line options, you can set them in the \f[CR]HWATCH\f[R] environment variable. For example, if you use \f[CR]bash\f[R], you can add the following to your \f[CR].bashrc\f[R]: .IP .EX export HWATCH=\[dq]\-\-no\-title \-\-color \-\-no\-help\-banner\[dq] .EE .SH KEYBINDS \f[B]hwatch\f[R] uses \f[I]Keybind\f[R] for operations on the command execution screen. .TP h Show help message. Press the \f[I]h\f[R] key again to return to the previous screen. .TP q Exit hwatch. .TP c Interprets ANSI colors and style sequences and displays them in color. This is the same as the \f[I]\-c(\[en]color)\f[R] option. Press the \f[I]c\f[R] key again to return to the original. .TP n Outputs the line number at the beginning of the line. .TP r Displays the output of the watch pane in reverse order. .TP d Highlight changes between updates. The diff specified by this flag is similar to the \f[I]watch\f[R] command. This is the same as the \f[I]\-d(\[en]differences)\f[R] option. You can switch the diff mode by pressing the \f[I]d\f[R] key. The \f[I]d\f[R] key toggles these in order. Use the \f[I]0\f[R], \f[I]1\f[R], and \f[I]2\f[R] keys to switch directly to each mode. .RS .PP \f[I]plane\f[R] \&... Do not show diff (default). .PP \f[I]watch\f[R] \&... Diff like watch command. Specifying the \f[I]\-d\f[R] option applies this mode. .PP \f[I]line\f[R] \&... Can be done diff in line units. .PP \f[I]word\f[R] \&... Can be done diff in line word units. .RE .TP o Switch output mode at stdout, stderr, and output. If you specify the output mode, the history pane will also display only the history where the specified output mode has changed. .TP O Display only the lines with differences during \f[CR]line\f[R] diff and \f[CR]word\f[R] diff. .TP t Switch display of header and history pane. .TP Backspace Switch display of history pane. .TP m Switch Mouse wheel support mode. With this option, copying text with your terminal may be harder. Try holding the Shift key. .TP 0 Switch diff mode to \f[I]plane\f[R]. .TP 1 Switch diff mode to \f[I]watch\f[R]. .TP 2 Switch diff mode to \f[I]line\f[R]. .TP 3 Switch diff mode to \f[I]word\f[R]. .TP F1 Display only \f[I]Stdout\f[R]. .TP F2 Display only \f[I]Stderr\f[R]. .TP F3 Display \f[I]Stdout\f[R] and \f[I]Stderr\f[R]. .TP + Increase interval by 0.5 seconds. .TP \- Decrease interval by 0.5 seconds (As long as it\[cq]s positive). .TP Tab Switch the target(\f[I]history\f[R] or \f[I]watch\f[R] pad). The target is operated with the \f[I]up\f[R] and \f[I]down\f[R] keys. .TP / Filter diffs by keyword. .TP * Filter diffs by regex. .SH BUGS See GitHub Issues: \c .UR https://github.com/blacknon/hwatch/issues .UE \c .SH AUTHOR Blacknon \c .MT blacknon@orebibou.com .ME \c