about summary refs log tree commit diff
path: root/Completion/Debian/Command
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-09-30 20:24:14 +0000
committerClint Adams <clint@users.sourceforge.net>2001-09-30 20:24:14 +0000
commit1d97597697ca9b74688844d05aa8e39d51610c95 (patch)
tree5d0456a6403d55c33aeb1bbdaedca0bcab6aa09f /Completion/Debian/Command
parentb5c135b2da86cefe866607d4d543982b7494d543 (diff)
downloadzsh-1d97597697ca9b74688844d05aa8e39d51610c95.tar.gz
zsh-1d97597697ca9b74688844d05aa8e39d51610c95.tar.xz
zsh-1d97597697ca9b74688844d05aa8e39d51610c95.zip
15915: completion for bts script
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r--Completion/Debian/Command/.distfiles2
-rw-r--r--Completion/Debian/Command/_bts116
2 files changed, 117 insertions, 1 deletions
diff --git a/Completion/Debian/Command/.distfiles b/Completion/Debian/Command/.distfiles
index a31dd95d0..0da6eee28 100644
--- a/Completion/Debian/Command/.distfiles
+++ b/Completion/Debian/Command/.distfiles
@@ -1,5 +1,5 @@
 DISTFILES_SRC='
 .distfiles
-_apt          _bug          _dpkg         _dpkg_source  _dupload
+_apt	_bts	_bug	_dpkg         _dpkg_source  _dupload
 _update-alternatives
 '
diff --git a/Completion/Debian/Command/_bts b/Completion/Debian/Command/_bts
new file mode 100644
index 000000000..d82606b4d
--- /dev/null
+++ b/Completion/Debian/Command/_bts
@@ -0,0 +1,116 @@
+#compdef bts
+local expl
+
+compset -N '[,.]' || compset -n 2
+
+if [[ CURRENT -eq 1 ]];
+then
+ _wanted cmd expl 'bts command' \
+ compadd show bugs close reopen retitle reassign merge unmerge tag \
+         severity forwarded notforwarded help
+else
+ case "$words[1]" in
+ 	show|close|unmerge|notforwarded)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 else
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	bugs)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted package expl 'package' _deb_packages avail
+	  _wanted maintainer expl 'package maintainer' compadd $DEBEMAIL
+	 fi
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	;;
+	reopen)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 elif [[ CURRENT -eq 3 ]];
+	 then
+	  _wanted submitter expl 'new submitter' compadd $DEBEMAIL
+	 else
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	retitle)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 elif [[ CURRENT -eq 3 ]];
+	 then
+	  _wanted submitter expl 'new title' compadd
+	 else
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	reassign)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 elif [[ CURRENT -eq 3 ]];
+	 then
+	  _wanted submitter expl 'new package' _deb_packages avail
+	 else
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	merge)
+	 _wanted bugnum expl 'bug number' compadd
+	 if [[ CURRENT -gt 2 ]];
+	 then
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	tag)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 elif [[ CURRENT -eq 3 ]];
+	 then
+	  _wanted operator expl 'operator' compadd - '+' '-' '='
+	 elif [[ CURRENT -eq 4 ]];
+	 then
+	  _wanted tag expl 'tag' \
+	  compadd patch wontfix moreinfo unreproducible fixed \
+	          security potato woody sid
+	 else
+	  _wanted tag expl 'tag' \
+	  compadd patch wontfix moreinfo unreproducible fixed \
+	          security potato woody sid
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	severity)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 elif [[ CURRENT -eq 3 ]];
+	 then
+	  _wanted severity expl 'severity' \
+	  compadd wishlist minor normal serious important critical grave
+	 else
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	forwarded)
+	 if [[ CURRENT -eq 2 ]];
+	 then
+	  _wanted bugnum expl 'bug number' compadd
+	 elif [[ CURRENT -eq 3 ]];
+	 then
+	  _wanted upstream expl 'upstream email' compadd
+	 else
+	  _wanted sep expl 'separator' compadd -S ' ' , .
+	 fi
+	;;
+	help)
+	;&
+	*) _wanted sep expl 'separator' compadd -S ' ' , .
+	;;
+ esac
+fi