Skip to content

Commit

Permalink
feat(feh): deassociate with xcf, pdf, dvi, txt
Browse files Browse the repository at this point in the history
As of feh 3.10, some formats are handled by feh out-of-the-box
(by the Imlib2 library), and some other formats can be opened by
providing the option `--conversion-timeout` which falls back to
ImageMagick’s `convert` utility.

- opening *.svg works out-of-the-box;
- opening *.svgz works through ImageMagick;
- opening *.xcf (Gimp vectorial image) is mentioned in feh’s manpage
  but I have been unable to open any such file;
- I could not test *.cdr (CorelDRAW vectorial image)
  but I would doubt it works better than *.xcf;
- opening *.otf, *.ttf (font files) works through ImageMagick;
- opening *.eps works through ImageMagick;
- opening *.ps, *.pdf, *.dvi (document files) works through ImageMagick,
  but only when the document contains a single page;
  + PDF and DVI are primarily used for possibly-multipage textual
    documents, PDF viewers are widely available and they are much better
    for this purpose than an image viewer that first converts documents
    to bitmaps; it’s unlikely that a user wants to use feh for these.
  + PS, albeit similar in function to PDF, is often used for single-page
    graphics such as logos; EPS is a restriction of PS to only one page.
- opening *.txt does not work and makes no sense.

Hence the rationale for not suggesting *.xcf, *.pdf, *.dvi, *.txt .
*.cdr may also be removed if one is able to try it first.

It’s not uncommon to have homonym files side by side, differing only by
extension, *.jpg and *.pdf (e.g. scanned documents) or *.png and *.xcf
(rendered image and work-in-progress design with Gimp).

This is a partial revert of 63574c8 (from 12 years ago).
  • Loading branch information
Maelan committed Jun 23, 2024
1 parent e209afb commit f2d0bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion completions/feh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ _comp_cmd_feh()

# FIXME: It is hard to determine correct supported extensions.
# feh can handle any format that imagemagick can plus some others
_comp_compgen_filedir 'xpm|tif?(f)|png|p[npgba]m|iff|?(i)lbm|jp?(e)g|jfi?(f)|gif|bmp|arg?(b)|tga|xcf|ani|ico|?(e)ps|pdf|dvi|txt|svg?(z)|cdr|[ot]tf|ff?(.gz|.bz2)|webp|y4m|hei[cf]?(s)|avif?(s)'
_comp_compgen_filedir 'xpm|tif?(f)|png|p[npgba]m|iff|?(i)lbm|jp?(e)g|jfi?(f)|gif|bmp|arg?(b)|tga|ani|ico|?(e)ps|svg?(z)|cdr|[ot]tf|ff?(.gz|.bz2)|webp|y4m|hei[cf]?(s)|avif?(s)'
} &&
complete -F _comp_cmd_feh feh

Expand Down

0 comments on commit f2d0bb6

Please sign in to comment.