(Experimental) Add support for iTerm2 inline image protocol

Close #1102

  fzf --preview 'imgcat -W $FZF_PREVIEW_COLUMNS -H $FZF_PREVIEW_LINES {}'

Notes:
* There is no good way to determine the height of the rendered image,
  so we assume that the image takes the full height of the preview
  window. So the image cannot be displayed with the other text.
* fzf-preview.sh script was updated to use `imgcat` if it's available
  but `chafa` is not.
* iTerm2 also supports Sixel, so adding support for this protocol is not
  quite necessary but it renders animated GIFs much better (e.g. looping).
This commit is contained in:
Junegunn Choi
2023-11-07 11:42:32 +09:00
parent 250d507bdf
commit 230fc49ae2
3 changed files with 39 additions and 13 deletions

View File

@@ -10,7 +10,12 @@ CHANGELOG
```sh
fzf --preview='fzf-preview.sh {}'
```
- (Experimental) Sixel and Kitty image support now also available on Windows
- (Experimental) iTerm2 inline image protocol support in preview window
```sh
# Using https://iterm2.com/utilities/imgcat
fzf --preview 'imgcat -W $FZF_PREVIEW_COLUMNS -H $FZF_PREVIEW_LINES {}'
```
- (Experimental) Sixel, Kitty, and iTerm2 image support now also available on Windows
- HTTP server can be configured to accept remote connections
```sh
# FZF_API_KEY is required for a non-localhost listen address