HWATCH(1)
π hwatch(1) π
okay bestie, sit down, hydrate, because I'm about to put you onto hwatch β a modern alternative to the watch command that records the differences in execution results and can check those differences after. yes, that's the whole name-line, and yes, it's iconic. it's the watch command but with β¨receiptsβ¨. it lives in section 1 of the manual, so you know it's a user command, and it's here to make your terminal main character energy.
πΈ SYNOPSIS πΈ
hwatch [options] command
one command, as many options as your heart desires. that's it. that's the whole vibe check. π«Ά
π¦ DESCRIPTION π¦
hwatch is like the watch command β it repeatedly executes a command and displays its output, on loop, forever, like your favorite song. BUT. and this is the part that ate β the output results can be scrolled and displayed. no more squinting at a frozen screen, bestie.
and it gets better. the difference of the execution result is recorded with the time stamp, so you can check it later. it's giving diary, it's giving historical archive, it's giving receipts for days. and when you're checking? it's also possible to display the diff with the previous difference together, so you can see the whole glow-up timeline.
if you specify it with options, the execution result can be recorded as a log with json. very much data girlboss behavior. π
β¨ Flags β¨
-h,--helpβ Prints help information π-V,--versionβ Prints version information π-b,--batchβ Output execution results tostdout. NOTE: Operations with TUI are not possible in batch mode. so like, no pretty panes for you in batch mode, sorry babe π-B,--beepβ beep if command has a change result. π tiny alarm clock energy, we love her-g,--chgexit [count]β Exit when output changes. If no value is specified, exit after the first detected change. Ifcountis specified, exit after that many detected changes. she leaves when things get interesting π--borderβ Surround each pane with a border frame. framing? for the aesthetic? obsessed πΌοΈ--with-scrollbarβ When theborderoption is enabled, display scrollbar on the right side of watch pane. (yes, she has to be invited by--borderfirst β they're a package deal)--mouseβ enable mouse wheel support. With this option, copying text with your terminal may be harder. Try holding the Shift key. β οΈ real talk, this one's a trade-off-c,--colorβ Interpret ANSI colors and style sequences and display in color. It can be changed later by key binding. π color is not a crime-r,--reverseβ Display text upside down. π literally what it says, no notes-C,--compressβ Compress data in memory. Note: If the output of the command is small, you may not get the desired effect. lowkey only worth it when the output is thicc-t,--no-titleβ Hide the UI on start. Use t to toggle it. stealth mode activated π€«--enable-summary-charβ collect character-level diff count in summary. counting characters like counting your blessings β¨-N,--line-numberβ Show line number. numbered like a proper list bestie π’-w,--wrapβ Disable line wrap mode. (yes, the flag is called "wrap" and it disables wrap β she's complicated, we accept her) π--no-help-bannerβ Hide the βDisplay help withhkeyβ message. for when you already know, iykyk--completion shellβ Output shell completion script. Supported shells:bash,fish,zsh. autocomplete? slay π--no-summaryβ disable the calculation for summary that is running behind the scenes, and disable the summary function in the first place.-x,--execβ Run the command directly, not through the shell. Much like the-xoption of thewatchcommand. direct communication, no middleman π«Ά-p,--use-ptyβ Run the command through a pseudo-TTY so commands that colorize on terminals can keep color output. keeping the color alive fr fr πΈ-O,--diff-output-onlyβ Display only the lines with differences during line diff and word diff. girlie does NOT have time for unchanged lines--ignore-spaceblockβ Ignore diffs where only consecutive whitespace blocks differ. whitespace drama? not today π--preciseβ Attempt to run as close to the interval as possible, regardless of how long the command takes to run. punctual queen β°
π Options π
-A,--aftercommand command to execute after difference occursβ Executes the specified command if the output changes. Information about changes is stored in json format in environment variable${HWATCH_DATA}. a little and then what trigger, love that for us--after-command-result-write-fileβ Pass${HWATCH_DATA}to aftercommand as a temporary file path instead of inline JSON data. same tea, different cup π-l,--logfile logfileβ 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. If a log file is already used, its contents will be read and executed. journaling but make it json π-s,--shell shell commandβ shell to use at runtime. can also insert the command to the location specified by{COMMAND}. pick your fighter, place your{COMMAND}-n,--interval secondsβ Seconds to wait between updates. Default is2. the pause between re-runs, the dramatic beat π-L,--limit limit numβ Set the number of history records to keep. only work in watch mode. Set0for unlimited recording. (default: 5000) [default: 5000]. unlimited recording is the hoarder arc, do it ποΈ--tab-size numβ Specifying tab display size. default4char.--diff-plugin pathβ Load a diffmode plugin dynamic library. Plugin-provided mode names can also be selected with-d/--differences. bringing her own plugins to the party π§-d,--differences [none, watch, line, word]β set diff mode. highlight changes between updates. If only-dis specified, it will be awatchdiff.noneβ¦ Do not show diff (default).watchβ¦ Diff likewatchcommand. Specifying the-doption applies this mode.lineβ¦ Can be done diff in line units.wordβ¦ Can be done diff in line word units.
-o,--output [output, stdout, stderr]β 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. filtering the timeline, periodt π-K,--keymap keymapβ Customize Keymap. Keymap is specified in the format ofkey=actionormodifierkey-key=action. build your own controls, main character behavior π
π Configuration π
If you always want to use some command-line options, you can set them in the HWATCH environment variable. For example, if you use bash, you can add the following to your .bashrc:
export HWATCH="--no-title --color --no-help-banner"
HWATCH_WATCH_FG and HWATCH_WATCH_BG can also be used to customize watch diff highlight colors. Supported formats are named colors, 0-255, #RRGGBB, and R,G,B.
set it once, forget it forever, live your truth. set-and-forget is the highest form of self care π«Ά
π KEYBINDS π
hwatch uses Keybind for operations on the command execution screen. It is the default keymap.
- h β Show help message. Press the h key again to return to the previous screen. your little helper fairy π§
- q β Exit
hwatch. bye bestie π - c β Interprets ANSI colors and style sequences and displays them in color. This is the same as the
-c(βcolor) option. Press the c key again to return to the original. toggle toggle toggle π - n β Outputs the line number at the beginning of the line.
- r β Displays the output of the watch pane in reverse order.
- d β Highlight changes between updates. This is the same as the
-d(βdifferences) option. You can switch the diff mode by pressing the d key. The d key toggles these in order. Use the 0, 1, 2, and 3 keys to switch directly to each mode.noneβ¦ Do not show diff (default).watchβ¦ Diff likewatchcommand. Specifying the-doption applies this mode.lineβ¦ Can be done diff in line units.wordβ¦ Can be done diff in line word units.
- o β Switch output mode at
stdout,stderr, andoutput. If you specify the output mode, the history pane will also display only the history where the specified output mode has changed. - O β Display only the lines with differences during line diff and word diff.
- w β Toggle line wrap mode.
- t β Switch display of header and history pane.
- Backspace β Switch display of history pane.
- m β Switch Mouse wheel support mode. With this option, copying text with your terminal may be harder. Try holding the Shift key. β οΈ trade-off again, she's consistent
- 0 β Switch diff mode to
none. - 1 β Switch diff mode to
watch. - 2 β Switch diff mode to
line. - 3 β Switch diff mode to
word. - F1 β Display only Stdout.
- F2 β Display only Stderr.
- F3 β Display Stdout and Stderr.
- Ctrl+P β Focus before keyword.
- Ctrl+N β Focus next keyword.
- Shift+O β Show only lines with differences(line/word diff mode only).
- Shift+S β Show summary infomation in history. (that's the original spelling okay, we keep it exactly as-is, no cap π)
- + β Increase interval by
0.5seconds. - - β Decrease interval by
0.5seconds (As long as itβs positive). don't go negative babe, that's not a vibe - p β Pause or resume command execution. βΈοΈβΆοΈ the power of the pause button
- Tab β Switch the target(history or watch pad). The target is operated with the up and down keys.
- / β Filter diffs by keyword.
- * β Filter diffs by regex. regex girlies, rise up π
π BUGS π
See GitHub Issues: https://github.com/blacknon/hwatch/issues
found a bug? report it, don't just suffer in silence bestie π«Ά
π AUTHOR π
Blacknon <blacknon@orebibou.com>
okay and that's the whole page, you're fully caught up, you understood the assignment π
this was Version 0.4.2 of the hwatch(1) manual β thanks for reading all the way to the bottom, you're literally the bestie of all time. go watch something. slay. πβ¨π
π¦ where this page comes from
- ubuntu stonking: hwatch 0.4.2-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms