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  libcap2    1: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 "$@"

Attachment: signature.asc
Description: Digital signature

Reply via email to