Giter VIP home page Giter VIP logo

gwatch's Introduction

gwatch

gwatch is a tool to execute a program periodically, and show the output changes over time. gwatch can highlight the differences between successive updates.

screencast

Usage

Usage:
  gwatch [options] command

Application Options:
  -e, --errexit   exit if command has a non-zero exit
  -n, --interval= time in seconds to wait between updates (default: 2.0)
  -t, --no-title  turn off header
  -x, --exec      pass command to exec instead of "sh -c"
  -s, --style=    interpret color and style sequences
  -v, --version   output version information and exit

Help Options:
  -h, --help      Show this help message

Keybinding

  • d: Change highlight mode between [NONE, CHAR, WORD, LINE].
  • p: Pause and resume command execution.
  • ?: Show help message.
  • q: Quit.
  • h, Left: Move left.
  • l, Right: Move right.
  • j, Down: Move down.
  • k, Up: Move up.
  • g, Home: Move to the top.
  • G, End: Move to the bottom.
  • Ctrl-f, PageDown: Move down by one page.
  • Ctrl-b, PageUp: Move up by one page.

Examples

To watch the contents of a directory change, you could use

$ gwatch ls -l

To see the interface counters, you could use

$ gwatch -n 1 ip -s link show

You can apply your own style to highlight the output changes with the color tag

$ gwatch -s red ls -l

The full definition of a color tag is as follows:

<foreground>:<background>:<flags>

Color tags may contain not just the foreground color but also the background color and additional flags. You can specify the following flags. Please refer to the rivo/tview for details.

l: blink
b: bold
d: dim
r: reverse (switch foreground and background color)
u: underline

gwatch's People

Contributors

haccht avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.