1
0
mirror of https://github.com/sharkdp/bat synced 2024-07-09 07:07:47 +00:00

ja: add section about integration with fzf

ref: c569774e1a
This commit is contained in:
Ryooooooga 2021-05-20 20:53:37 +09:00 committed by David Peter
parent 1439dde265
commit 07d4179274

View File

@ -95,6 +95,17 @@ bat f - g # output 'f', then stdin, then 'g'.
### 他のツールとの統合
#### `fzf`
[`fzf`](https://github.com/junegunn/fzf) のプレビューウィンドウに `bat` を使用できます。
その場合、`bat` の `--color=always` オプションを用いてカラー出力を強制しなければなりません。
また、`--line-range` オプションを用いることで巨大なファイルの読み込み時間を制限できます:
```bash
fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
```
詳しくは [`fzf` の `README`](https://github.com/junegunn/fzf#preview-window) を参照してください。
#### `find` or `fd`
`find``-exec` オプションを使用して、`bat` ですべての検索結果をプレビューできます: