summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDavid Peter <sharkdp@users.noreply.github.com>2021-02-27 11:47:04 +0100
committerGitHub <noreply@github.com>2021-02-27 11:47:04 +0100
commitc569774e1a8528fab91225dabdadf53fde3916ea (patch)
tree0f57c6d6ff9e8547cba7b4ce05df22a700cba74b /README.md
parent0371f55541292ec6f27f95729aa1d319973800f0 (diff)
Add section about integration with fzf
see #448
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index e027f9f8..9994d2fe 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,16 @@ bat f - g # output 'f', then stdin, then 'g'.
### Integration with other tools
+#### `fzf`
+
+You can use `bat` as a previewer for [`fzf`](https://github.com/junegunn/fzf). To do this,
+use `bat`s `--color=always` option to force colorized output. You can also use `--line-range`
+option to restrict the load times for long files:
+```bash
+fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
+```
+For more information, see [`fzf`s `README`](https://github.com/junegunn/fzf#preview-window).
+
#### `find` or `fd`
You can use the `-exec` option of `find` to preview all search results with `bat`: