Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] Add mupdf completer
- X-seq: zsh-workers 43046
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] Add mupdf completer
- Date: Thu, 14 Jun 2018 16:18:15 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=kueTmaWDsHECR1SWFUhTd86H3InN2NVS0QpmqPv/V5Y=; b=aSxStULZIFspsElGU9/HZzyXBJAkHlwWd0mbuC367AnmQHg6cXvVxzaLPTk8S7mYdC A9krdR+hh2310e/3edzkPL5TNemg5skKIC7/j1ZjJRrLc/Qe8XIuS+GFvwIIdryAAhJI A1pDlXWWd4AU48JtyKlqvQmMlfxo7bjSSOW1+odQTuP5KJqfZJoBuTLKKDCzV6y3V5ps UpC45DI9cvmTKVvl603kJR9jpdXdEmBl23ddXUwfk6J4meSSiFYRUF8oQ8VMpJSdrNsM ZUMXNUDsbJKBNHsXKZOg3mMdruoONCSMPjzLnd76BnfPdpBBSdXAK19V9/byZ6HM3WoE lZSQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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})(-.)"'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author