Skip to content

Fish Shell breaks Kitty image previews with ranger #6994

Closed
@purxiz

Description

@purxiz

Please tell us which fish version you are using by executing the following:
fish, version 3.1.1

Please tell us which operating system and terminal you are using. The output of uname -a and echo $TERM may be helpful in this regard although other commands might be relevant in your specific situation.

Ubuntu 20.04 with Kitty Terminal

Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:

sh -c 'env HOME=$(mktemp -d) fish'

Occurs on a fresh install of fish in a VM, with the only 3rd party program being ranger's rc.conf to enable image previews. This bug is documented on the ranger page here, but I believe it to be an error(?) in fish shell, rather than with ranger:

ranger/ranger#1919

Steps to reproduce are install ranger, enable image previews and set image_preview_method=kitty.

Image previews work properly in BASH, but in FISH, only a portion of the image is shown. The image is not resized to fit the pane, and the ranger panes are no longer drawn while the portion of the image is being previewed.
I have tried downgrading to 3.1.0-1.2 (the only other version available in apt for Ubuntu 20.04), and the issue persists, though slightly differently. The picture is still rendered incorrectly, with only a portion of it being drawn, but only the text in the ranger panes disappear. The outlines remain.

I also tried with version 3.1.2, issue still persists.

Here is a picture of the issue:
image

The expected behavior is that I can still see the bounding boxes on ranger, as well as the contents, and the image is resized to fit into the right pane. Here is an image just before the image preview finishes loading. Once it is displayed, the terminal looks like above.
image

These images were produced on fish 3.1.2.

Here is the expected behavior:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions