From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23281 invoked by alias); 8 Jan 2017 03:50:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40303 Received: (qmail 17593 invoked from network); 8 Jan 2017 03:50:49 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.25):SA:0(1.3/5.0):. Processed in 1.601827 secs); 08 Jan 2017 03:50:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=FILL_THIS_FORM, FILL_THIS_FORM_LONG,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=KwY YFEZmsdl+rXGVssH6gbkZ/Ek=; b=J1Xlz9D48hLorRKt+UTvuJToj78vhIa45tZ V9KWRjIS+Ty6Vzf9O0zdnCXfX1Ozf9sx2ix9uyhc94Vg3g3bW+eIuHdJMHOLxQuh ClelH+Cf1BCSoXYeusIvJ215PX4/tRz+qN63XlC1tP0qvszyLKPbdksdzMfDQHkG bHHZS4DM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Kw YYFEZmsdl+rXGVssH6gbkZ/Ek=; b=djI+1uwUE2WgfI+oiDOMlsuPvmfUSbZK2S nxosDZtLmdsF1TU02XECawmKCy7Py49EWFRbMWywkQrxq5pHIryEs1RSnfvXM2Ym LlZxTKdtfeXe8MazfmT3TbPKwqhkFX/KIj0uaZaH1L0ML63Mjfgmli8PY3f11Ic/ jDZHlk0lk= X-ME-Sender: X-Sasl-enc: FbDzuum6L+OssmwmwUU8A5phZ2UsFmMG/00Mug+7tWW9 1483847442 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] _bts: Add more subcommands. Date: Sun, 8 Jan 2017 03:47:24 +0000 Message-Id: <1483847244-7913-1-git-send-email-danielsh@fujitsu.shahaf.local2> X-Mailer: git-send-email 2.1.4 Since 'done' is deprecated, stop offering it but do complete after it. --- Completion/Debian/Command/_bts | 64 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/Completion/Debian/Command/_bts b/Completion/Debian/Command/_bts index f415989..70b95ef 100644 --- a/Completion/Debian/Command/_bts +++ b/Completion/Debian/Command/_bts @@ -22,16 +22,18 @@ compset -N '[,.]' && first=0 [[ $first -eq 0 ]] || compset -n 2 if [[ CURRENT -eq 1 ]]; then - _wanted cmd expl 'bts command' compadd show bugs close reopen retitle \ + _wanted cmd expl 'bts command' compadd show bugs reopen retitle \ reassign merge unmerge tag tags severity forwarded notforwarded help \ clone submitter found notfound block unblock user usertag usertags \ package owner noowner reportspam cache cleancache claim unclaim \ - subscribe unsubscribe fixed notfixed affects + subscribe unsubscribe fixed notfixed affects spamreport status \ + select done archive unarchive summary forcemerge limit listcachedbugs \ + version return fi case "$words[1]" in - (close|unmerge|notforwarded|noowner|reportspam) + (unmerge|notforwarded|noowner|reportspam|spamreport|archive|unarchive) if [[ CURRENT -eq 2 ]]; then _debbugs_bugnumber else @@ -75,7 +77,10 @@ case "$words[1]" in _wanted sep expl 'separator' compadd -S ' ' , . fi ;; - merge) + (status) + # TODO: some additional syntaxes aren't being completed. + ;& + (merge|forcemerge) _debbugs_bugnumber if [[ CURRENT -gt 2 ]]; then _wanted sep expl 'separator' compadd -S ' ' , . @@ -208,8 +213,10 @@ case "$words[1]" in ;; (cleancache) _alternative \ - 'package:package:_deb_packages avail' \ - 'email:email address:_email_addresses -c' \ + 'source-packages:source package:_deb_packages -P "src:" source' \ + 'package:binary package:_deb_packages avail' \ + 'email:email address:_email_addresses -c -P "from:"' \ + 'bugnum:bug number:_debbugs_bugnumber' \ 'all:all:compadd ALL' ;; (claim|unclaim) @@ -232,6 +239,51 @@ case "$words[1]" in _wanted package expl 'package' _deb_packages avail fi ;; + (summary) + case $CURRENT in + (2) _debbugs_bugnumber;; + (3) _message -e message-number 'message number';& + (4) _wanted sep expl 'separator' compadd -S ' ' , .;; + esac + ;; + (close|done) + case $CURRENT in + (2) _debbugs_bugnumber;; + (3) _message -e version 'version';& + (4) _wanted sep expl 'separator' compadd -S ' ' , .;; + esac + ;; + (select) + _values -S : -w "select field" \ + '*package[binary package]: :_deb_packages avail' \ + '*source[source package]: :_deb_packages source' \ + '*maintainer:email address of the maintainer:_email_addresses -c' \ + '*submitter:email address of the submitter:_email_addresses -c' \ + '*severity:severity:(wishlist minor normal important serious grave critical)' \ + '*tag[tags applied to the bug]:tags:' \ + '*owner:owner:_email_addresses -c' \ + '*correspondent:email address of a correspondent:_email_addresses -c' \ + '*affects:affected package:_deb_packages avail' \ + '*users:namespaces of usertags:_email_addresses -c' \ + '*archive:whether to search archived bugs:((0:no 1:yes both:both))' + # undocumented: bugs + _wanted sep expl 'separator' compadd -S ' ' , . + ;; + (limit) + _values -S : -w "limit field" \ + '*submitter[email address of the submitter]:submitter:_email_addresses -c' \ + '*date[bug submission timestamp]:unix timestamp' \ + '*subject[subject of the bug]:bug subject:' \ + '*msgid[message-id of the initial bug report]:message-id:' \ + '*package[binary package]: :_deb_packages avail' \ + '*source[source package]: :_deb_packages source' \ + '*tag[tags applied to the bug]:tags:' \ + '*severity:severity:(wishlist minor normal important serious grave critical)' \ + '*owner:owner:_email_addresses -c' \ + '*affects:affected package:_deb_packages avail' \ + '*archive:whether to search archived bugs:((0:no 1:yes both:both))' + _wanted sep expl 'separator' compadd -S ' ' , . + ;; help) ;& *) _wanted sep expl 'separator' compadd -S ' ' , .