Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Add .tif as valid extension for TIFF files in _imagemagick, _graphicsmagick, _okular
- X-seq: zsh-workers 39287
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Antony Lee <antony.lee@xxxxxxxxxxxx>
- Subject: Re: Add .tif as valid extension for TIFF files in _imagemagick, _graphicsmagick, _okular
- Date: Sun, 11 Sep 2016 16:32:17 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1473643962; bh=tgz9TAxmq83oQUirH0nZM9fcLSa78EFgCexMNo9cSls=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=PGpAKvd44x2hk32C736UX1poHsouJh1+1gNCbtDAGUNkF3oa6HGDWme/pRA7c7FvZjUhvvVUQcMXp8+El4xnSON1q/Idv+kkWoyeG3eC4ugsiY5s5ucavVxjwLbqHQU+RWH4pB8hV55QW7/2poqnyXQ7AhAnZkur8wNFPGL801wYs+YwUFec6eiMMDmAYa7AibfYHg6nyfkQwSJl+nQpRotYdDbQwjVzKOptWXebueQqdHjB++2y9WtO+BM6e/YqsVnLiLvEZpnJrmWEVVGHFc3ThoLSKQ0+ewQfi/wjR5UXIbXtYFFg7S7vAvZ3SYuvBAaLl3SvKtKGCV8Axt+vUw==
- In-reply-to: <CAGRr6BFN4RbgMpmoJh7EmMWgov_VZF8N0HhL5aNb1mSY2h=w1g@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAGRr6BFN4RbgMpmoJh7EmMWgov_VZF8N0HhL5aNb1mSY2h=w1g@mail.gmail.com>
On 7 Sep, Antony Lee wrote:
> Currently, the Unix/_imagemagick, Unix/_graphicsmagic and X/_okular
> completers only recognize .tiff, but not .tif, as the extension of a TIFF
> file (the latter is common for files generated on Windows due to 8.3
> filenames). Compare with X/_{gqview,xv} which do recognize .tif as well.
I don't have xifg installed either so haven't verified that. Otherwise,
the following should handle it.
Oliver
diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick
index 9306acd..150f5ae 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
+formats=jpg:jpeg:jp2:j2k:jpc:jpx:jpf:tif: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 1fc6089..4a9b62a 100644
--- a/Completion/Unix/Command/_imagemagick
+++ b/Completion/Unix/Command/_imagemagick
@@ -12,7 +12,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)
+formats=(jpg jpeg jp2 j2k jpc jpx jpf tif 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)(${(j:|:)formats})(-.)"
diff --git a/Completion/X/Command/_okular b/Completion/X/Command/_okular
index bfdb4de..f08f81c 100644
--- a/Completion/X/Command/_okular
+++ b/Completion/X/Command/_okular
@@ -1,10 +1,10 @@
#compdef okular
local extns
-extns="{pdf,ps,eps,dvi}(.gz|.bz2)(#c,1)|djvu|tiff|chm|cbr|cbz"
+extns="(pdf|ps|eps|dvi)(|.gz|.bz2)|djvu|tif|tiff|chm|cbr|cbz"
_arguments \
'(-p --page)'{-p,--page}'[page of the document to be shown]:page: ' \
'--presentation[start the document in presentation mode]' \
'--unique[unique instance control]' \
- "*:Okular documents:_files -g '*.(#i)($extns)(-.)'"
+ "*:okular document:_files -g '*.(#i)($extns)(-.)'"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author