From 59fb65293a306dd685c1098d73eb62e5b0892eb8 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 17 Jan 2024 13:21:00 +0900 Subject: [PATCH] README.md: More information on image support --- README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 55a3dba..af4ede6 100644 --- a/README.md +++ b/README.md @@ -734,18 +734,16 @@ 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. +fzf can display images in the preview window using one of the following protocols: + +* [Kitty graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) +* [iTerm2 inline images protocol](https://iterm2.com/documentation-images.html) +* [Sixel](https://en.wikipedia.org/wiki/Sixel) + +See [bin/fzf-preview.sh](bin/fzf-preview.sh) script for more information. ```sh -fzf --preview=' - if file --mime-type {} | grep -qF image/; then - kitty icat --clear --transfer-mode=memory --unicode-placeholder --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {} | sed \$d - else - bat --color=always {} - fi -' +fzf --preview 'fzf-preview.sh {}' ``` Tips