From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] Add mupdf completer
Date: Thu, 14 Jun 2018 16:18:15 -0500 [thread overview]
Message-ID: <20180614211810.GA72494@CptOrmolo.darkstar> (raw)
A person in IRC asked why mupdf didn't complete epub files, so just give
it a full completer. Thanks dana for extracting the *_extensions arrays
from the source.
- Matthew Martin
diff --git a/Completion/Unix/Type/_pdf b/Completion/Unix/Type/_pdf
index 5fda42a12..60cee84ee 100644
--- a/Completion/Unix/Type/_pdf
+++ b/Completion/Unix/Type/_pdf
@@ -1,4 +1,4 @@
-#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf apvlv epdfview mupdf
+#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf apvlv epdfview
local expl ext=''
diff --git a/Completion/X/Command/_mupdf b/Completion/X/Command/_mupdf
new file mode 100644
index 000000000..8a3c76459
--- /dev/null
+++ b/Completion/X/Command/_mupdf
@@ -0,0 +1,53 @@
+#compdef mupdf
+
+local -a ext=(
+ cbt
+ cbz
+ tar
+ zip
+ epub
+ gproof
+ fb2
+ htm
+ html
+ xhtml
+ xml
+ bmp
+ gif
+ hdp
+ j2k
+ jfif
+ jfif-tbnl
+ jp2
+ jpe
+ jpeg
+ jpg
+ jpx
+ jxr
+ pam
+ pbm
+ pgm
+ png
+ pnm
+ ppm
+ tif
+ tiff
+ wdp
+ pdf
+ pclm
+ ai
+ svg
+ oxps
+ xps
+)
+
+_arguments -S -s -A '-*' \
+ '-p+[use specified password]:password:' \
+ '-r+[specify initial zoom level]:resolution [72]:' \
+ '-A+[specify anti-aliasing quality]:bits [8]:({0..8})' \
+ '-C+[specify full-page tint:tint (RRGGBB) [FFFAF0]:' \
+ '-W+[specify page width]:width:' \
+ '-H+[specify page height]:height:' \
+ '-S+[specify font size]:font size:' \
+ '-U+[specify user style sheet]:CSS file:_files' \
+ ': :_files -g "*(#i).(${(j:|:)ext})(-.)"'
reply other threads:[~2018-06-18 0:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180614211810.GA72494@CptOrmolo.darkstar \
--to=phy1729@gmail.com \
--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).