All Projects → blacknon → hwatch

blacknon / hwatch

Licence: MIT license
A modern alternative to the watch command, records the differences in execution results and can check this differences at after.

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to hwatch

ipfs-chat
Real-time P2P messenger using go-ipfs pubsub. TUI. End-to-end encrypted texting & file-sharing. NAT traversal.
Stars: ✭ 84 (-77.3%)
Mutual labels:  tui, terminal-ui
flinch
A collection of terminal-based widgets for richer Golang CLI apps.
Stars: ✭ 32 (-91.35%)
Mutual labels:  tui, terminal-ui
tblogs
A simple and useful blogs' reader for your terminal
Stars: ✭ 28 (-92.43%)
Mutual labels:  tui
open-watch
An open-source handmade smartwatch. All of the codes, PCBs and schematics are available. ⌚
Stars: ✭ 35 (-90.54%)
Mutual labels:  watch
wiki-tui
A simple and easy to use Wikipedia Text User Interface
Stars: ✭ 74 (-80%)
Mutual labels:  tui
csol
A small collection of solitaire/patience games (Klondike, FreeCell, Spider, Yukon, etc.) to play in the terminal
Stars: ✭ 25 (-93.24%)
Mutual labels:  tui
WWDChrome
Chrome extension which lets you watch WWDC Developer Videos in Google Chrome (thus not having to use Safari)
Stars: ✭ 18 (-95.14%)
Mutual labels:  watch
autorsync
Node.js File Watch + rsync
Stars: ✭ 56 (-84.86%)
Mutual labels:  watch
cylon-deb
TUI menu driven bash shell script to update and maintain a Debian based Linux distro.
Stars: ✭ 23 (-93.78%)
Mutual labels:  tui
termshark
A terminal UI for tshark, inspired by Wireshark
Stars: ✭ 7,368 (+1891.35%)
Mutual labels:  tui
sfm
simple file manager
Stars: ✭ 163 (-55.95%)
Mutual labels:  tui
AbsTK
The Abstract Toolkit – a widget toolkit for GUI and text-mode applications.
Stars: ✭ 67 (-81.89%)
Mutual labels:  tui
talks
Awesome Talks
Stars: ✭ 27 (-92.7%)
Mutual labels:  watch
libgen-downloader
A simple tool to search and download ebooks from libgen via terminal user interface.
Stars: ✭ 98 (-73.51%)
Mutual labels:  tui
cxxcurses
Header only ncurses wrapper
Stars: ✭ 24 (-93.51%)
Mutual labels:  tui
ncgrep
NCGREP, which is based on ncurses library to provide user interface, is a grep tool for searching text on target directory.
Stars: ✭ 23 (-93.78%)
Mutual labels:  tui
bulbo
🍹 Generate your static site with gulp plugins!
Stars: ✭ 14 (-96.22%)
Mutual labels:  watch
cs
command line codespelunker or code search
Stars: ✭ 34 (-90.81%)
Mutual labels:  tui
must-watch
A list of cybai's must-watch videos
Stars: ✭ 19 (-94.86%)
Mutual labels:  watch
dblab
Interactive client for PostgreSQL and MySQL
Stars: ✭ 199 (-46.22%)
Mutual labels:  tui

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).
  • Support ANSI color code.
  • Execution result can be scroll.

Install

macOS (brew)

brew install hwatch

macOS (MacPorts)

sudo port install hwatch

Cargo Install

cargo install hwatch

Usage

hwatch 0.3.7
blacknon <[email protected]>
A modern alternative to the watch command, records the differences in execution results and can
check this differences at after.

USAGE:
    hwatch [OPTIONS] <command>...

ARGS:
    <command>...

OPTIONS:
    -c, --color                    interpret ANSI color and style sequences
    -d, --differences              highlight changes between updates
    -N, --line-number              show line number
    -x, --exec                     Run the command directly, not through the shell. Much like the
                                   `-x` option of the watch command.
    -l, --logfile <logfile>        logging file
    -s, --shell <shell_command>    shell to use at runtime. can  also insert the command to the
                                   location specified by {COMMAND}. [default: "sh -c"]
    -n, --interval <interval>      seconds to wait between updates [default: 2]
    -h, --help                     Print help information
    -V, --version                  Print version information

watch window keybind

  • , ... move selected screen(history/watch).
  • H ... show help window.
  • C ... toggle color.
  • D ... switch diff mode.
  • N ... switch line number display.
  • Q ... exit hwatch.
  • 0 ... disable diff.
  • 1 ... switch watch type diff.
  • 2 ... switch line type diff.
  • 3 ... switch word type diff.
  • F1 ... only stdout print.
  • F2 ... only stderr print.
  • F3 ... print output.
  • Tab ... toggle select screen(history/watch).
  • / ... filter history by string.
  • * ... filter history by regex.
  • Esc ... unfiltering.

Example

interval 10 second

Use the -n option to specify the command execution interval.

hwatch -n 3 command...

logging output

The command execution result can be output as a log in json format.

hwatch -n 3 -l hwatch_log.json command...

When you check the json log, you can easily check it by using this script.

Use shell function

If you want the shell function to be executed periodically, you can specify the shell command to be executed with -s as follows.

# bash
hwatch -n 3 -s 'bash -c "source ~/.bashrc"; {COMMAND}' command...

# zsh
hwatch -n 3 -s 'zsh -c "source ~/.zshrc"; {COMMAND}' command...

ANSI Color code

If you want to see output colored with ANSI color code, enable color mode.

To enable color mode, run hwatch with the -c option. Alternatively, you can enable / disable the color mode with the C key during execution.

hwatch -n 3 -c command...

diff view

To enable color mode, run hwatch with the -d option.

There are several "diff modes" available. Switching can be done with the D key.

hwatch -n 3 -d command...

watch diff

line diff

word diff

history filtering

You can filter history as a string with / key and as a regular expression with * key.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].