Package: zsh
Version: 4.3.6-7
Severity: wishlist
Tags: patch

Hi,

There is no completion for the bts commands subscribe and unsubscribe
yet.  Also the "owner" command does only accept a single bug number
(running "bts --no-action owner 1 2 3" gives an error).

The attached patches should solve these problems.

Regards,
Ansgar
>From 328dd5375a69e305c57c96aed685175eba1c89c0 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <[EMAIL PROTECTED]>
Date: Sun, 26 Oct 2008 19:23:39 +0100
Subject: [PATCH] "bts owner" only accepts a single bug number

---
 Completion/Debian/Command/_bts |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/Completion/Debian/Command/_bts b/Completion/Debian/Command/_bts
index cf36e55..e8f6a0b 100644
--- a/Completion/Debian/Command/_bts
+++ b/Completion/Debian/Command/_bts
@@ -125,7 +125,7 @@ case "$words[1]" in
      _wanted sep expl 'separator' compadd -S ' ' , .
     fi
   ;;
-  (submitter|owner)
+  (submitter)
     if [[ CURRENT -eq 2 ]]; then
       _message -e bugnum 'bug number'
     else
@@ -135,6 +135,17 @@ case "$words[1]" in
        'bang:bang:compadd \!'
     fi
   ;;
+  (owner)
+    if [[ CURRENT -eq 2 ]]; then
+      _message -e bugnum 'bug number'
+    elif [[ CURRENT -eq 3 ]]; then
+      _alternative \
+        'email:email address:_email_addresses -c' \
+        'bang:bang:compadd \!'
+    else
+      _wanted sep expl 'separator' compadd -S ' ' , .
+    fi
+  ;;
   (found|notfound)
     if [[ CURRENT -eq 2 ]]; then
       _message -e bugnum 'bug number'
-- 
1.5.6.5

>From e58603cfaed732938a20f7d3615ab579b509de77 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <[EMAIL PROTECTED]>
Date: Sun, 26 Oct 2008 19:26:54 +0100
Subject: [PATCH] add completion for "bts" commands "subscribe" and "unsubscribe"

---
 Completion/Debian/Command/_bts |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Completion/Debian/Command/_bts b/Completion/Debian/Command/_bts
index e8f6a0b..9253e2d 100644
--- a/Completion/Debian/Command/_bts
+++ b/Completion/Debian/Command/_bts
@@ -25,7 +25,8 @@ if [[ CURRENT -eq 1 ]]; then
   _wanted cmd expl 'bts command' compadd show bugs close 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
+      package owner noowner reportspam cache cleancache subscribe \
+      unsubscribe
   return
 fi
 
@@ -135,7 +136,7 @@ case "$words[1]" in
        'bang:bang:compadd \!'
     fi
   ;;
-  (owner)
+  (owner|subscribe|unsubscribe)
     if [[ CURRENT -eq 2 ]]; then
       _message -e bugnum 'bug number'
     elif [[ CURRENT -eq 3 ]]; then
-- 
1.5.6.5

Reply via email to