Bug#691526: zsh: completion for apt-mark

2014-04-07 Thread Alessandro Ghedini
Control: tags -1 fixed-upstream

On Sun, Apr 06, 2014 at 06:10:20PM +0200, Alessandro Ghedini wrote:
 Control: forwarded -1 http://www.zsh.org/mla/workers/2014/msg00322.html
 
 On Fri, Oct 26, 2012 at 09:13:27PM +0200, Sebastian Ramacher wrote:
  Package: zsh
  Version: 5.0.0-2
  Severity: wishlist
  Tags: patch
  
  Please apply the attached patch to add completion for apt-mark. It is
  implemented using the framework used by apt-get and friends.
 
 I just forwarded your patch upstream [0].

...which has been merged in commit [0].

Cheers

[0] 
http://sourceforge.net/p/zsh/code/ci/60bedea3e712178beac392af1ca6ed7291630459/

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;inidehG ordnasselA;eg;say~~reverse'


signature.asc
Description: Digital signature


Bug#691526: zsh: completion for apt-mark

2014-04-06 Thread Alessandro Ghedini
Control: forwarded -1 http://www.zsh.org/mla/workers/2014/msg00322.html

On Fri, Oct 26, 2012 at 09:13:27PM +0200, Sebastian Ramacher wrote:
 Package: zsh
 Version: 5.0.0-2
 Severity: wishlist
 Tags: patch
 
 Please apply the attached patch to add completion for apt-mark. It is
 implemented using the framework used by apt-get and friends.

I just forwarded your patch upstream [0].

Cheers

[0] http://www.zsh.org/mla/workers/2014/msg00322.html

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;inidehG ordnasselA;eg;say~~reverse'


signature.asc
Description: Digital signature


Bug#691526: zsh: completion for apt-mark

2012-10-26 Thread Sebastian Ramacher
Package: zsh
Version: 5.0.0-2
Severity: wishlist
Tags: patch

Please apply the attached patch to add completion for apt-mark. It is
implemented using the framework used by apt-get and friends.

Kind regards

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (650, 'unstable'), (601, 'testing'), (600, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.5-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zsh depends on:
ii  libc6  2.13-35
ii  libcap21:2.22-1.2
ii  libtinfo5  5.9-10

Versions of packages zsh recommends:
ii  libc6 2.13-35
ii  libncursesw5  5.9-10
ii  libpcre3  1:8.31-1

Versions of packages zsh suggests:
ii  zsh-doc  4.3.17-1

-- no debconf information

-- 
Sebastian Ramacher
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index b51b2fc..4ee28d7 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -1,4 +1,4 @@
-#compdef apt-get apt-cache apt-cdrom apt-config
+#compdef apt-get apt-cache apt-cdrom apt-config apt-mark
 
 _apt () {
   case $service in
@@ -6,6 +6,7 @@ _apt () {
 apt-cache) _apt-cache $@;;
 apt-cdrom) _apt-cdrom $@;;
 apt-config) _apt-config $@;;
+apt-mark) _apt-mark $@;;
 *) _message unknown command $service;;
   esac
 }
@@ -586,4 +587,34 @@ _apt_caching_policy () {
  /var/lib/dpkg/available -nt $1 ]]
 }
 
+_apt-mark () {
+  _apt_arguments _apt-mark_sm \
+-h,--help:bool \
+-v,--version:bool \
+-f,--file:configfile \
+-c,--config-file:configfile \
+-o,--option:arbitem \
+-qq:bool \
+-s:bool \
+-- \
+/$'auto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/$'manual\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/$'hold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/$'unhold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/$'showauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/$'showmanual\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/$'showhold\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages $expl_packages[@] installed' \# \| \
+/[]/	':argument-1::compadd $expl_action[@] auto manual hold unhold showauto showmanual showhold'
+
+  _apt-mark () {
+local expl_action expl_packages
+_description actions expl_action 'action'
+_description packages expl_packages 'package'
+
+_apt-mark_sm
+  }
+
+  _apt-mark $@
+}
+
 _apt $@


signature.asc
Description: Digital signature