zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: dpkg -s style support for _dpkg
Date: Tue, 28 Dec 1999 21:57:15 -0500	[thread overview]
Message-ID: <19991228215715.A8279@dman.com> (raw)

This allows user-level configuration of how dpkg -s calls _deb_packages.

Index: Completion/Debian/_dpkg
===================================================================
RCS file: /cvs/zsh/zsh/Completion/Debian/_dpkg,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 _dpkg
--- Completion/Debian/_dpkg	1999/12/22 17:19:44	1.1.1.3
+++ Completion/Debian/_dpkg	1999/12/29 02:53:15
@@ -1,5 +1,7 @@
 #compdef dpkg dpkg-deb
 
+local dds
+
 _dpkg_deb_args=('(--build)-b[build archive]:directory:_files -/' \
            '(-b)--build:directory:_files -/' \
            '(--contents)-c[list contents]:Debian package:_files -g \*.deb' \
@@ -20,6 +22,9 @@
            '--version[show version]' \
            '--licence[show licensing]')
 
+zstyle -s ':completion${curcontext}:deb:dpkg' status dds
+[[ "$dds" == installed ]] || dds="avail"
+
 case "$words[1]" in
 dpkg)
 _arguments -s '(--install)-i[install packages]:Debian package:_files -g \*.deb' \
@@ -38,8 +43,8 @@
            '--merge-avail[merge available]:package file:_files' \
            '--clear-avail[clear available]' \
            '--forget-old-unavail[forget uninstalled unavailable]' \
-           '(--status)-s[display package status]:packages:_deb_packages avail' \
-           '(-s)--status:packages:_deb_packages avail' \
+           '(--status)-s[display package status]:packages:_deb_packages $dds' \
+           '(-s)--status:packages:_deb_packages $dds' \
            '(--print-avail)-p[display available details]:packages:_deb_packages avail' \
            '(-p)--print-avail:packages:_deb_packages avail' \
            '(--listfiles)-L[list owned files]:packages:_deb_packages installed' \


             reply	other threads:[~1999-12-29  2:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-29  2:57 Clint Adams [this message]
2000-01-04  9:14 Sven Wischnowsky
2000-01-04 16:27 ` Clint Adams
2000-01-05  9:12 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19991228215715.A8279@dman.com \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).