bat-extras/doc/batwatch.md

51 lines
1.5 KiB
Markdown
Raw Normal View History

2019-09-27 01:09:19 +02:00
# bat-extras: batwatch
Watch for changes in one or more files, and print them with `bat`.
2020-05-16 06:08:43 +02:00
Please note this watches filesystem files, and not command output like `watch(1)`.
2019-09-27 01:09:19 +02:00
2020-05-16 05:53:59 +02:00
## Usage
2019-09-27 01:09:19 +02:00
batwatch [OPTIONS] FILE...
2019-09-27 01:09:19 +02:00
2020-05-16 05:53:59 +02:00
## Options
2019-09-27 01:09:19 +02:00
| Short | Long | Description |
| ----- | --------------------- | ------------------------------------------------------------ |
| | `--watcher=[watcher]` | Use a specific program to watch for file changes. See [below](#watchers) for more details. |
| | `--clear` | Clear the screen before printing the files.<br />This is enabled by default. |
2019-10-25 22:54:45 +02:00
| | `--no-clear` | Do not clear the screen before printing the files. |
2019-09-27 01:09:19 +02:00
| | `--color` | Force color output. |
| | `--no-color` | Force disable color output. |
All remaining options are passed through to bat.
## Watchers
Batwatch uses external programs to watch for file changes.
Currently, the following programs are supported:
- [entr](http://entrproject.org/)
2019-10-25 22:54:45 +02:00
There is also a fallback `poll` watcher available.
2019-09-27 01:09:19 +02:00
## Installation
This script is a part of the `bat-extras` suite of scripts. You can find install instructions [here](../README.md#installation).
## Issues?
If you find an issue or have a feature suggestion, make a pull request or issue through GitHub!
2020-05-16 05:53:59 +02:00
Contributions are always welcome.