From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Antony Lee <antony.lee@berkeley.edu>
Cc: zsh-workers@zsh.org
Subject: Re: Add .tif as valid extension for TIFF files in _imagemagick, _graphicsmagick, _okular
Date: Sun, 11 Sep 2016 16:32:17 +0200 [thread overview]
Message-ID: <5500.1473604337@hydra.kiddle.eu> (raw)
In-Reply-To: <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)(-.)'"
prev parent reply other threads:[~2016-09-12 1:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 17:48 Antony Lee
2016-09-11 14:32 ` Oliver Kiddle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5500.1473604337@hydra.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=antony.lee@berkeley.edu \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).