Open ykhan21 opened 2 months ago
I also encountered a similar problem, and I was able to reproduce it on Windows Terminal + gitbash:
echo hello | fzf --preview='type ls'
This is issue related to sixels image previews on Windows. Your issue seems to be related to text previews.
Also, I cannot reproduce your issue. See the image below. This is on Git Bash + Windows Terminal.
What version is your git, fzf, and Windows Terminal? And what font do you use in Windows Terminal?
This is issue related to sixels image previews on Windows. Your issue seems to be related to text previews.
Also, I cannot reproduce your issue. See the image below. This is on Git Bash + Windows Terminal.
What version is your git, fzf, and Windows Terminal? And what font do you use in Windows Terminal?
This is issue related to sixels image previews on Windows. Your issue seems to be related to text previews. Also, I cannot reproduce your issue. See the image below. This is on Git Bash + Windows Terminal. What version is your git, fzf, and Windows Terminal? And what font do you use in Windows Terminal?
- Window version: windows 11 家庭中文版 23H2 22631.4037
- Git version: 2.42.0.windows.2
- Windows Terminal version: 1.20.11781.0
- fzf version: 0.55.0
- Font: Cascadia Mono
I can't reproduce it with Cascadia Mono. The preview works for me.
Does it work in non-fullscreen mode? e.g. --height=-1
Yes, ls -name *.png | fzf --height=-1 --preview 'chafa -s 50x50 -f sixels {}'
works.
Also, if the image is too large and it is displayed, some residue is left from the large image when you go to a smaller image. Here, I have --height=40%
.
Yes,
ls -name *.png | fzf --height=-1 --preview 'chafa -s 50x50 -f sixels {}'
works.
This works, but clicking to select something is broken.
I just saw this issue and I have 2 relevant issues open in the chafa
project. See Chafa-#217 and Chafa-#218. Also a issue in wezterm which I think is more related to #3646 and #3486 but I suspect there are underlying issues connecting all of these. There's additional complexity introduced when using ssh
and tmux
fwiw.
I believe there are overlapping issues with fzf
and chafa
. Why I came here in the first place was actually to ask about $FZF_PREVIEW_COLUMNS
and $FZF_PREVIEW_LINES
since these do not appear to be calculated in a way that is compatible with chafa
's (though if you read the issue there's some confusion there too).
I'll keep working with the chafa
team but it may be good to at least have these cross linked and note that this issue appears to be cross platform.
It's a long story.
We currently have two different renderer implementations for Windows, one is based on tcell library which is used when opening fzf in full-screen mode. The other is "light renderer" which was added later to support --height
option on Windows.
"Light" renderer has image support (using simple/naive pass-through mechanism), but tcell renderer does not, so that's why image is only shown when --height
is given.
I tried removing the tcell renderer and using the light renderer even in full-screen mode, but it turned out to have an issue with non-ASCII characters, so I had to revert the decision.
https://github.com/junegunn/fzf/commit/559fb7ee4552312f59a4bbe428199db9f5aa1247
We need to find a way to fix https://github.com/junegunn/fzf/issues/3799
Checklist
man fzf
)Output of
fzf --version
0.55.0 (fc69308)
OS
Shell
Problem / Steps to reproduce
Windows Terminal Preview now supports sixels. The stable release of Windows Terminal does not yet support it.
Problem:
In pwsh, on Windows Terminal Preview, when you run
ls -name *.png | fzf --preview 'chafa -s 50x50 -f sixels {}'
, the preview window is empty.Steps:
scoop install fzf chafa
.ls -name *.png | fzf --preview 'chafa -s 50x50 -f sixels {}'
in directory that has png files.