Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#503575: zsh: improvements for "bts" completion



On Sun, Oct 26, 2008 at 07:35:50PM +0100, Ansgar Burchardt wrote:
> 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.

Thanks, Ansgar.  I've forward-ported your changes to CVS HEAD:

Index: Completion/Debian/Command/_bts
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_bts,v
retrieving revision 1.10
diff -u -r1.10 _bts
--- Completion/Debian/Command/_bts	4 Oct 2008 18:25:44 -0000	1.10
+++ Completion/Debian/Command/_bts	26 Oct 2008 19:31:17 -0000
@@ -25,7 +25,8 @@
   _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 claim unclaim
+      package owner noowner reportspam cache cleancache claim unclaim \
+      subscribe unsubscribe
   return
 fi
 
@@ -125,7 +126,7 @@
      _wanted sep expl 'separator' compadd -S ' ' , .
     fi
   ;;
-  (submitter|owner)
+  (submitter)
     if [[ CURRENT -eq 2 ]]; then
       _message -e bugnum 'bug number'
     else
@@ -135,6 +136,17 @@
        'bang:bang:compadd \!'
     fi
   ;;
+  (owner|subscribe|unsubscribe)
+    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'



Messages sorted by: Reverse Date, Date, Thread, Author