Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Fwd: Bug#763343: Missing JPEG 2000 file extensions / imagemagick|graphicsmagick [origin: malat@xxxxxxxxxx]



Hi,

the following was reported in Debian at https://bugs.debian.org/763343

----- Forwarded message from Mathieu Malaterre <malat@xxxxxxxxxx> -----
Date: Mon, 29 Sep 2014 15:48:45 +0200
From: Mathieu Malaterre <malat@xxxxxxxxxx>
To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
Subject: [Pkg-zsh-devel] Bug#763343: Missing JPEG 2000 file extensions / imagemagick|graphicsmagick
Reply-To: Mathieu Malaterre <malat@xxxxxxxxxx>, 763343@xxxxxxxxxxxxxxx

Package: zsh
Version: 5.0.6-1
Tags: patch

Please update the list of image format:

$ cat /usr/share/zsh/functions/Completion/Unix/_imagemagick|_graphicsmagick
[...]
formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
[...]

into

formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv


As per references:

$ grep jp2 /etc/ImageMagick/mime.xml
  <mime type="image/jp2" description="JPEG-2000 image"
data-type="string" offset="4" magic="jP" priority="50" />
  <mime type="image/jp2" description="JPEG-2000 image"
data-type="string" offset="0" magic="\xFF\x4F\xFF\x51\x00"
priority="50" />
  <mime type="image/jp2" description="JPEG-2000 image"
data-type="long" endian="MSB" offset="3" magic="0x0c6a5020"
priority="50" />
  <mime type="image/jp2" description="JPEG-2000 image" priority="100"
pattern="*.jp2" />
  <mime type="image/jp2" description="JPEG-2000 image" priority="100"
pattern="*.jpc" />
  <mime type="image/jp2" description="JPEG-2000 image" priority="100"
pattern="*.jpx" />
  <mime type="image/jp2" description="JPEG-2000 image" priority="100"
pattern="*.j2k" />
  <mime type="image/jp2" description="JPEG-2000 image" priority="100"
pattern="*.jpf" />

Regards.
----- End forwarded message -----

I'd commit this as the following patch.


Patch in wdiff format (allows to easier spot the difference IMHO):

% git diff | dwdiff --diff-input -d :
diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick
index d18ffbc..9306acd 100644
--- a/Completion/Unix/Command/_graphicsmagick
+++ b/Completion/Unix/Command/_graphicsmagick
@@ -3,7 +3,7 @@
 local state line expl formats curcontext="$curcontext"
 typeset -A opt_args
 
 formats=jpg:jpeg:{+jp2:j2k:jpc:jpx:jpf:+}tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
 
 if (( $# )); then
   _files "$@" -g "*.(#i)(${~formats//:/|})(-.)"
diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick
index 5876adc..115cb01 100644
--- a/Completion/Unix/Command/_imagemagick
+++ b/Completion/Unix/Command/_imagemagick
@@ -11,7 +11,7 @@ typeset -A opt_args
 #
 # and certainly many other things...
 
 formats=jpg:jpeg:{+jp2:j2k:jpc:jpx:jpf:+}tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
 
 if (( $# )); then
   _files "$@" -g "*.(#i)(${~formats//:/|})(-.)"


Patch as normal unified diff:

% git diff
diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick
index d18ffbc..9306acd 100644
--- a/Completion/Unix/Command/_graphicsmagick
+++ b/Completion/Unix/Command/_graphicsmagick
@@ -3,7 +3,7 @@
 local state line expl formats curcontext="$curcontext"
 typeset -A opt_args
 
-formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
+formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
 
 if (( $# )); then
   _files "$@" -g "*.(#i)(${~formats//:/|})(-.)"
diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick
index 5876adc..115cb01 100644
--- a/Completion/Unix/Command/_imagemagick
+++ b/Completion/Unix/Command/_imagemagick
@@ -11,7 +11,7 @@ typeset -A opt_args
 #
 # and certainly many other things...
 
-formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
+formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xcf:xwd:xbm:xpm:yuv
 
 if (( $# )); then
   _files "$@" -g "*.(#i)(${~formats//:/|})(-.)"


		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@xxxxxxxxxxxxxxx  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@xxxxxxxxx (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)



Messages sorted by: Reverse Date, Date, Thread, Author