Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Enhancement] Use secondary fileviewer if the first exits with non-zero code #1091

@benelan

Description

@benelan

It would be great if vifm could try a secondary fileviewer if the first one exits with a non-zero code. This request stems from the script I'm working on in #1090.

For example, if I have the the following in my vifmrc

fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
            \ sixel-preview image %c %pw %ph %pd %pc,
            \ identify %f

and add the following to the top of the sixel-preview script

ensure_installed() { command -v "$1" >/dev/null 2>&1 || exit 1; }
ensure_installed img2sixel
ensure_installed exiftool

I'd like vifm to move on to the identify %f fileviewer if neither img2sixel nor exiftool are installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions