about summary refs log tree commit diff
path: root/Completion/Debian/Type
diff options
context:
space:
mode:
authordana <dana@dana.is>2019-03-25 16:19:00 -0500
committerdana <dana@dana.is>2019-03-25 16:19:00 -0500
commit683c2cc1ca6877a74b91c869e24642fdc4eb5ab3 (patch)
tree0a1d368a856038384b1adeba2eac6dde353bca31 /Completion/Debian/Type
parent52f3266bd010918122ae039510486131a2c4afe3 (diff)
downloadzsh-683c2cc1ca6877a74b91c869e24642fdc4eb5ab3.tar.gz
zsh-683c2cc1ca6877a74b91c869e24642fdc4eb5ab3.tar.xz
zsh-683c2cc1ca6877a74b91c869e24642fdc4eb5ab3.zip
44160 (tweaked): Completion: Add _deb_files, match *.ddeb
Add new helper function for generating Debian package/control files, use it
where applicable

Adjusted only for minor white-space corruption in original patch
Diffstat (limited to 'Completion/Debian/Type')
-rw-r--r--Completion/Debian/Type/_deb_files17
1 files changed, 17 insertions, 0 deletions
diff --git a/Completion/Debian/Type/_deb_files b/Completion/Debian/Type/_deb_files
new file mode 100644
index 000000000..e84871cc4
--- /dev/null
+++ b/Completion/Debian/Type/_deb_files
@@ -0,0 +1,17 @@
+#autoload
+
+# This function is used to generate file names for Debian package files (.deb
+# and friends). In addition to the options supported by _files, it understands
+# the following:
+#
+#   -c  Include .changes and .dsc files
+
+local -a _expl _fopts _c _exts=( deb ddeb udeb )
+
+zparseopts -a _fopts -D -E - \
+  c=_c 1 2 F+: J+: M+: n P+: q r+: R+: S+: V+: W+: X+:
+
+(( $#_c )) && _exts+=( changes dsc )
+
+_description files _expl 'Debian package'
+_files "${(@)_fopts}" "${(@)_expl}" -g "*.(${(j<|>)_exts})(-.)"