mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-06-04 00:10:49 +00:00
Update README: Experimental support for Kitty graphics protocol
This commit is contained in:
parent
f103aa4753
commit
2952737755
|
@ -6,7 +6,7 @@ CHANGELOG
|
||||||
- Experimental, partial support for Kitty image protocol in the preview window
|
- Experimental, partial support for Kitty image protocol in the preview window
|
||||||
```sh
|
```sh
|
||||||
fzf --preview='
|
fzf --preview='
|
||||||
if file --mime-type {} | grep -qF 'image/'; then
|
if file --mime-type {} | grep -qF image/; then
|
||||||
# --transfer-mode=memory is the fastest option but if you want fzf to be able
|
# --transfer-mode=memory is the fastest option but if you want fzf to be able
|
||||||
# to redraw the image on terminal resize or on 'change-preview-window',
|
# to redraw the image on terminal resize or on 'change-preview-window',
|
||||||
# you need to use --transfer-mode=stream.
|
# you need to use --transfer-mode=stream.
|
||||||
|
|
17
README.md
17
README.md
|
@ -69,6 +69,7 @@ Table of Contents
|
||||||
* [2. Switch between sources by pressing CTRL-D or CTRL-F](#2-switch-between-sources-by-pressing-ctrl-d-or-ctrl-f)
|
* [2. Switch between sources by pressing CTRL-D or CTRL-F](#2-switch-between-sources-by-pressing-ctrl-d-or-ctrl-f)
|
||||||
* [3. Interactive ripgrep integration](#3-interactive-ripgrep-integration)
|
* [3. Interactive ripgrep integration](#3-interactive-ripgrep-integration)
|
||||||
* [Preview window](#preview-window)
|
* [Preview window](#preview-window)
|
||||||
|
* [Previewing an image](#previewing-an-image)
|
||||||
* [Tips](#tips)
|
* [Tips](#tips)
|
||||||
* [Respecting `.gitignore`](#respecting-gitignore)
|
* [Respecting `.gitignore`](#respecting-gitignore)
|
||||||
* [Fish shell](#fish-shell)
|
* [Fish shell](#fish-shell)
|
||||||
|
@ -730,6 +731,22 @@ seq 100 | fzf
|
||||||
history | fzf
|
history | fzf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Previewing an image
|
||||||
|
|
||||||
|
Since 0.43.0, fzf has experimental support for [Kitty graphics
|
||||||
|
protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/), so if you use
|
||||||
|
Kitty, you can make fzf display an image in the preview window.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
fzf --preview='
|
||||||
|
if file --mime-type {} | grep -qF image/; then
|
||||||
|
kitty icat --clear --transfer-mode=memory --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {}
|
||||||
|
else
|
||||||
|
bat --color=always {}
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
```
|
||||||
|
|
||||||
Tips
|
Tips
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -591,6 +591,18 @@ e.g.
|
||||||
echo "$i"
|
echo "$i"
|
||||||
sleep 0.01
|
sleep 0.01
|
||||||
done'\fR
|
done'\fR
|
||||||
|
|
||||||
|
Since 0.43.0, fzf has experimental support for Kitty graphics protocol,
|
||||||
|
so if you use Kitty, you can make fzf display an image in the preview window.
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
\fBfzf --preview='
|
||||||
|
if file --mime-type {} | grep -qF "image/"; then
|
||||||
|
kitty icat --clear --transfer-mode=memory --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {}
|
||||||
|
else
|
||||||
|
bat --color=always {}
|
||||||
|
fi
|
||||||
|
'\fR
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
|
|
Loading…
Reference in New Issue
Block a user