diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-10-09 01:29:03 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-10-09 01:29:03 +0900 |
commit | 2952737755aeda4c088a84693569f7b881162160 (patch) | |
tree | 93ea56195698123d2b284060e45406cc9a7186dc /README.md | |
parent | f103aa4753b435f8f45c5130323effeb75583c15 (diff) |
Update README: Experimental support for Kitty graphics protocol
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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) * [3. Interactive ripgrep integration](#3-interactive-ripgrep-integration) * [Preview window](#preview-window) + * [Previewing an image](#previewing-an-image) * [Tips](#tips) * [Respecting `.gitignore`](#respecting-gitignore) * [Fish shell](#fish-shell) @@ -730,6 +731,22 @@ seq 100 | 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 ---- |