Hi, 09/03/2020 15:04, Daniel Shahaf : > Thanks, v2 looks good. Would you please post it to [email protected]? > I could just commit it upstream, but I'd like to have a second pair of eyes > over it. I will send the patch now and put you in CC for handling the final details before merge. >> + '*:dsc file:_files -g "*.{changes,dsc}(-.)"' > In this line — > > 1. You may need to change «{foo,bar}» to «(foo|bar)» to avoid NO_MATCH errors > when foo exists but bar doesn't. (Once you do this, you may then need to > change «(-.)» to «(#q-.)».) Tried this change locally, and the completion was not working anymore. Back to the v2 version, when I "rm *.dsc" in a test directory so that only *.changes files are present, I did not get any NO_MATCH error. The completion just went fine on *.changes files. Maybe I am missing something, but this modification is not included in attached v3 patch (version I am sending to zsh-workers). > 2. Add "buildinfo" alongside "changes" and "dsc".
Good catch, added in v3 patch. Ciao, Romain.
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-09 15:36:16.206314783 +0100
@@ -0,0 +1,30 @@
+#compdef dscverify
+
+# $ dscverify --version
+# This is dscverify, from the Debian devscripts package, version 2.20.2
+# ...
+
+_dscverify() {
+ local all_opts=(
+ '--help[show the help message and exit]'
+ '--version[show the version + copyright and exit]'
+ '--no-default-keyrings[do not check against the 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]'
+ '--verbose[do not suppress GPG output]'
+ '*:dsc file:_files -g "*.{changes,dsc,buildinfo}(-.)"'
+ )
+
+ local first_only=(
+ '(--no-conf --noconf)'{--no-conf,--noconf}'[do not read the devscripts config file]'
+ )
+
+ if (( CURRENT == 2 )); then
+ all_opts+=($first_only)
+ fi
+
+ _arguments \
+ "$all_opts[@]"
+}
+
+_dscverify "$@"
signature.asc
Description: OpenPGP digital signature

