[Pkg-zsh-devel] Bug#953389: zsh-common: completion for dscverify is missing
Romain Porte
debian at microjoe.org
Sun Mar 8 20:50:50 GMT 2020
Package: zsh-common
Version: 5.8-3
Severity: normal
Tags: patch upstream
Dear Maintainer,
As I was playing with some of the devtools, I found that the `dscverify`
program did not have any completion. The devtools package provides a
bash completion, but not a zsh one, unfortunately.
Hence I took the time to write a small ZSH completion helper to work
with this command. It has the advantage of listing only *.dsc and
*.changes files, which is handy when a directory is getting filled with
all of the other packaging files.
I have marked this bug as 'patch' because I propose a .diff of this
contribution attached, and also as 'upstream' because according to the
source package the other Debian/ completions are already coming from
upstream.
I would be happy to help in the upstreaming process if you find it
welcome. I prefer to create this bug first to avoid duplicate work
and because this completion is Debian-specific, but I think it can
be upstreamed easily given the other already-present completions.
Cheers,
Romain.
-- Package-specific info:
Packages which provide code meant to be sourced in .zshrc:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=================-============-============-=================================
un command-not-found <none> <none> (no description available)
un grml-debootstrap <none> <none> (no description available)
Packages which provide vendor completions:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-==========================-============-=======================================================
ii borgbackup 1.1.10-2 amd64 deduplicating and compressing backup program
ii calibre 4.99.4+dfsg+really4.11.2-1 all powerful and easy to use e-book manager
ii curl 7.68.0-1 amd64 command line tool for transferring data with URL syntax
ii mpv 0.32.0-1 amd64 video player based on MPlayer/mplayer2
ii pulseaudio 13.0-5 amd64 PulseAudio sound server
ii ripgrep 11.0.2-1 amd64 Recursively searches directories for a regex pattern
ii systemd 244.3-1 amd64 system and service manager
ii torsocks 2.3.0-2+b1 amd64 use SOCKS-friendly applications with Tor
ii udev 244.3-1 amd64 /dev/ and hotplug management daemon
ii youtube-dl 2020.01.24-0.1 all downloader of videos from YouTube and other sites
dpkg-query: no path found matching pattern /usr/share/zsh/vendor-functions/
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
zsh-common depends on no packages.
Versions of packages zsh-common recommends:
ii zsh 5.8-3
Versions of packages zsh-common suggests:
pn zsh-doc <none>
-- no debconf information
-------------- next part --------------
diff -u -N --recursive ../zsh-5.8.orig/Completion/Debian/Command/_dscverify ./Completion/Debian/Command/_dscverify
--- ../zsh-5.8.orig/Completion/Debian/Command/_dscverify 1970-01-01 01:00:00.000000000 +0100
+++ ./Completion/Debian/Command/_dscverify 2020-03-08 21:36:53.897794438 +0100
@@ -0,0 +1,19 @@
+#compdef dscverify
+
+_dscverify() {
+ all_opts=(
+ '--help[show the help message and exit]'
+ '--version[show the version + copyright and exit]'
+ '--no-default-keyrings[do not check against de default keyrings]'
+ '--keyring[Add keyring to the list of keyrings used]:keyring:_files -g "*.{kbx,gpg}(-.)"'
+ '(--nosigcheck --no-sig-check -u)'{--nosigcheck,--no-sig-check,-u}'[do not verify the GPG signature]'
+ '(--no-conf --noconf)'{--no-conf,--noconf}'[do not read the devscripts config file]'
+ '--verbose[do not suppress GPG output]'
+ '*:dsc file:_files -g "*.{changes,dsc}(-.)"'
+ )
+
+ _arguments \
+ "$all_opts[@]"
+}
+
+_dscverify "$@"
More information about the Pkg-zsh-devel
mailing list