zsh-workers
 help / color / mirror / code / Atom feed
* Fwd: [Pkg-zsh-devel] Bug#681518: [zsh] dpkg --print-foreign-architectures isn't filled automatically by zsh when tab is pressed [origin: sebastian@ramacher.at]
@ 2014-06-28 12:29 Axel Beckert
  0 siblings, 0 replies; only message in thread
From: Axel Beckert @ 2014-06-28 12:29 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

Hi,

attached a patch which expands zsh's dpkg tab completion by some more
recent options. Initially reported in Debian at
https://bugs.debian.org/681518, patch submitted at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681518#13

The patch (also in the attached mail) applies cleanly again zsh git
HEAD.

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)

[-- Attachment #2: Type: message/rfc822, Size: 8601 bytes --]

[-- Attachment #2.1.1.1.1: Type: text/plain, Size: 414 bytes --]

Control: tags -1 + patch

Hi,

On 2012-07-14 00:06:32, Mika Suomalainen wrote:
> This should probably be changed as "dpkg is missing multiarch related
> option fillings", because it seems that --add-architecture and
> --remove-architecture are missing too.

I've attached a patch that adds --add-architecture, --remove-architecture and
--print-foreign-architectures.

Regards
-- 
Sebastian Ramacher

[-- Attachment #2.1.1.1.2: 681515.patch --]
[-- Type: text/x-diff, Size: 1212 bytes --]

diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg
index e7184e7..3503d09 100644
--- a/Completion/Debian/Command/_dpkg
+++ b/Completion/Debian/Command/_dpkg
@@ -50,6 +50,9 @@ _dpkg_actions=(
   '--yet-to-unpack[list uninstalled]'
   '--print-architecture[print target architecture]'
   '--print-installation-architecture'
+  '--print-foreign-architectures[print list of extra architectures]'
+  '--add-architecture[add extra architecture]:architecture:->add_architecture'
+  '--remove-architecture[remove extra architecture]:architecture:->remove_architecture'
   '--compare-versions[compare version numbers]:*::expression:= ->compare_versions'
 )
 
@@ -179,4 +182,13 @@ case "$state" in
     _call_function ret _dpkg_$state && return ret
     _files
   ;;
+  add_architecture)
+    _call_function ret _dpkg_$state && return ret
+    _wanted architecture expl 'extra architecture' \
+      compadd ${(f)"$(dpkg-architecture -L 2>/dev/null)"}
+  ;;
+  remove_architecture)
+    _call_function ret _dpkg_$state && return ret
+    _wanted architecture expl 'extra architecture' \
+      compadd ${(f)"$(dpkg --print-foreign-architectures 2>/dev/null)"}
 esac

[-- Attachment #2.1.1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2.1.2: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Pkg-zsh-devel mailing list
Pkg-zsh-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-zsh-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-28 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-28 12:29 Fwd: [Pkg-zsh-devel] Bug#681518: [zsh] dpkg --print-foreign-architectures isn't filled automatically by zsh when tab is pressed [origin: sebastian@ramacher.at] Axel Beckert

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).