From f2d0bb69631cf51ebffd0afd291695bfb4e19036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlan?= Date: Sun, 23 Jun 2024 14:22:44 +0200 Subject: [PATCH] feat(feh): deassociate with xcf, pdf, dvi, txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- completions/feh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/feh b/completions/feh index 3762574dbbc..a9d4a9a4c8e 100644 --- a/completions/feh +++ b/completions/feh @@ -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