You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
fzf has a preview option but wezterm imgcat causes it to hang. In fzf's preview panel you'll see Loading .. up at the top right and it will never finish.
I'll show below that there is something unique about wezterm imgcat so I do not believe this is purely an fzf issue, though I'm sure they could make improvements to help too. But fzf is highly used (64k stars, 2.5k forks) so I think a lot of people are having this issue.
To Reproduce
# brew install fzf
FZF_DEFAULT_OPTS='--preview "wezterm imgcat {}"'
fzf
# type "png" or something
Result looks like this (sometimes the loading message does not show)
I've tried a few variations such as with wezterm imgcat --width $FZF_PREVIEW_COLUMNS {}, using the tmux passthrough option, and even very small image widths. To confirm, using the command from the cli works properly and is very fast.
Configuration
I don't think there is any relevant settings in my config but they are located here and I believe the configs are highly readable (if not, let me know and I can explain and will improve)
Expected Behavior
Expected behavior is to display image
Logs
No response
Anything else?
In part this is due to fzf taking some time but there seems to be some uniqueness to wezterm imgcat. This is the only one that actually hangs for me
I saw #5049 and #1951 where it seems there might be some confusion so I included the relevant install commands for brew and I think we have everything to reproduce the issue. If you need anything else, let me know.
I actually ran all the commands with \fzf to avoid my alias (fzf='fd --no-ignore | fzf'), so this should work out of the box
The text was updated successfully, but these errors were encountered:
This has already been addressed in junegunn/fzf#3646. See the last two comments.
In short, the issue lies with fzf reading responses to queries sent by wezterm imgcat (which it requires to properly size and encode images), causing it to stall (waiting for the responses that never get to it).
Very little could be done to mitigate this on wezterm's end such as using the TIOCGWINSZ ioctl to get terminal size info and environment variables to guess the terminal's name/version (but this is very messy and I personally discourage it).
In the end the main issue still lies with fzf. It should give room for previewers to query the terminal as this is required for various for various functionality!
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
fzf has a preview option but
wezterm imgcat
causes it to hang. Infzf
's preview panel you'll seeLoading ..
up at the top right and it will never finish.I'll show below that there is something unique about
wezterm imgcat
so I do not believe this is purely anfzf
issue, though I'm sure they could make improvements to help too. Butfzf
is highly used (64k stars, 2.5k forks) so I think a lot of people are having this issue.To Reproduce
Result looks like this (sometimes the loading message does not show)
I've tried a few variations such as with
wezterm imgcat --width $FZF_PREVIEW_COLUMNS {}
, using the tmux passthrough option, and even very small image widths. To confirm, using the command from the cli works properly and is very fast.Configuration
I don't think there is any relevant settings in my config but they are located here and I believe the configs are highly readable (if not, let me know and I can explain and will improve)
Expected Behavior
Expected behavior is to display image
Logs
No response
Anything else?
In part this is due to
fzf
taking some time but there seems to be some uniqueness towezterm imgcat
. This is the only one that actually hangs for mechafa
This works almost instantly (it is dependent upon your window size)
catimg
Also works almost instantly
wezterm imgcat
hangs
FZF_DEFAULT_OPTS='--preview="wezterm imgcat --width 40 {}"'
I saw #5049 and #1951 where it seems there might be some confusion so I included the relevant install commands for
brew
and I think we have everything to reproduce the issue. If you need anything else, let me know.I actually ran all the commands with
\fzf
to avoid my alias (fzf='fd --no-ignore | fzf'
), so this should work out of the boxThe text was updated successfully, but these errors were encountered: