Last Updated on 2024-09-26 by Clay
Introduction
viddy
is a tool similar to watch
for running a command at regular intervals in a Linux terminal and displaying the output.
However, compared to watch
, viddy
offers a more polished interface, supports colored output, scrolling, querying, and history. I have now almost completely replaced watch
with viddy
.
Installation
On most Linux distributions, you can install it as follows:
- Install with Cargo (Rust’s package manager): If Rust is already installed on your system, you can install viddy with Cargo:
cargo install viddy
- Manual Download: You can download the binary from the official GitHub page and manually add it to your system’s PATH.
Basic Usage
viddy
follows a syntax similar to watch
:
viddy "<COMMANDS>"
Key Features
- Run commands periodically:
viddy
will run the specified command at the default interval (2 seconds). - Scrollable interface:
viddy
supports scrolling through command output using arrow keys, Page Up/Down, which is useful for long outputs. - Colored output: Unlike
watch
,viddy
retains the colors of the command’s output, which is especially useful for commands likegit
orls --color
. - History:
viddy
stores the output of each command execution and allows you to view past results. - Custom refresh interval: You can change the refresh interval using the
-n
option:viddy -n 5 ls
will refresh every 5 seconds. - Additional parameters:
-d
or--no-clear
: Do not clear the screen on each refresh.-h
or--help
: Display help information.
Comparison with watch
- Interface:
viddy
offers a more modern interface with support for scrolling and viewing history, whichwatch
lacks. - Color support:
viddy
supports colored output, whilewatch
requires the--color
option to achieve the same effect. - Output history:
viddy
allows you to view previous command outputs, whereaswatch
only displays the current result. - Query: For large amounts of information, viddy supports searching for specific keywords to locate relevant sections.
References
- sachaos/viddy: A modern watch command. Time … – GitHub
- viddy: 👀 Modern watch command implemented in Go. Time …