From bc0433e51832effa04bcd61144ba0ec2c1c95eb4 Mon Sep 17 00:00:00 2001 From: Alexander Schlarb Date: Thu, 9 Aug 2018 20:10:29 +0200 Subject: [PATCH] common-aliases: Extend list of recognized raster & vector image formats --- .../common-aliases/common-aliases.plugin.zsh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 4e5ff848f..7511f1ef2 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -61,8 +61,25 @@ if is-at-least 4.2.0; then _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex) for ft in $_editor_fts; do alias -s $ft='$EDITOR'; done + # open image files in image viewer if [[ -n "$XIVIEWER" ]]; then - _image_fts=(jpg jpeg png gif mng tiff tif xpm) + # List inspired by https://en.wikipedia.org/wiki/Image_file_formats + _image_fts=( + #: Raster formats + # JPEG, JPEG2000, HEIF/HEVC, JBIG + jpg jpeg jpe jif jfif jfi jp2 j2k jpf jpx jpm mj2 heif heic jbg jbig + # BMP, BPG, GIF, ICO/ANI, PCX, PNG+MNG, TGA, TIFF, WebP (Web) + bmp bpg gif dib ico cur ani pcx png mng tga tiff tif webp + # NetPBM, XBM/XPM/XWD (ASCII) + pbm bgm ppm pnm xbm xpm xwd + # CIFF, DNG, DPX, ECW, FITS, ICS, RGBE (HDR & Raw) + crw dng dpx ecw fits ics ids fit fts hdr + # DDS ICNS OpenRaster SunRaster (Other) + dds icns ora ras sun + #: Vector formats + # CGM WMF Gerber IGES SVG + cgm wmf emf wmz emz gbr iges svg svgz + ) for ft in $_image_fts; do alias -s $ft='$XIVIEWER'; done fi