Add documentation about "tail -f"
commita9ec5c063a9f296f50f94ed4c5a815306eee6b01
authorDavid Peter <sharkdp@users.noreply.github.com>
dateMon 11 Feb 2019, 21:54 (8 years ago)
parent8470fd7
README.md+9
@@ -105,6 +105,15 @@ If you happen to use [`fd`](https://github.com/sharkdp/bat), you can use the `-X
105105fd … -X bat
106106```
107107
108+#### `tail -f`
109+
110+`bat` can be combined with `tail -f` to continuously monitor a given file with syntax highlighting.
111+```bash
112+tail -f /var/log/pacman.log | bat --paging=never -l log
113+```
114+Note that we have to switch off paging in order for this to work. We have also specified the syntax
115+explicitly (`-l log`), as it can not be auto-detected in this case.
116+
108117## Installation
109118
110119### On Ubuntu