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@xxxxxxxxxxxxxxx (Mail) X See http://www.nonhtmlmail.org/campaign.html | abe@xxxxxxxxx (Mail+Jabber) / \ I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)
--- Begin Message ---
- From: Sebastian Ramacher <sebastian@xxxxxxxxxxx>
- To: mkaysi@xxxxxxxxxxxxxxxxxxxxx, 681518@xxxxxxxxxxxxxxx
- Subject: [Pkg-zsh-devel] Bug#681518: [zsh] dpkg --print-foreign-architectures isn't filled automatically by zsh when tab is pressed
- Date: Sun, 28 Oct 2012 02:56:24 +0200
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ramacher.at; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=AqnPNVjUrw0JrQHoH2iS+126NQsWZPD/8S92oC+VbZI=; b=eXq3C/bHujCC9udZWXB+1J+J+tUp5LKrrJjyT4sgSkEOLypoGK+PNV05bwMUZrk19/GEKbFIOmmpiDx+iK6b9JhjzlMlaTcrrD/eBQwMjXOtE4jxHMbYiBGRKcbcFU26dbWtfzilINLH9xFVGQuV9kEqYerFznr8raxHOdRCXX4=;
- In-reply-to: <50008DD8.2050400@users.sourceforge.net>
- List-archive: <http://lists.alioth.debian.org/pipermail/pkg-zsh-devel>
- List-help: <mailto:pkg-zsh-devel-request@lists.alioth.debian.org?subject=help>
- List-id: Development Mailinglist for the Debian packaging of Zsh <pkg-zsh-devel.lists.alioth.debian.org>
- List-post: <mailto:pkg-zsh-devel@lists.alioth.debian.org>
- List-subscribe: <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-zsh-devel>, <mailto:pkg-zsh-devel-request@lists.alioth.debian.org?subject=subscribe>
- List-unsubscribe: <http://lists.alioth.debian.org/cgi-bin/mailman/options/pkg-zsh-devel>, <mailto:pkg-zsh-devel-request@lists.alioth.debian.org?subject=unsubscribe>
- References: <5000873C.1040508@users.sourceforge.net> <50008DD8.2050400@users.sourceforge.net>
- Reply-to: Sebastian Ramacher <sebastian@xxxxxxxxxxx>, 681518@xxxxxxxxxxxxxxx
- Sender: pkg-zsh-devel-bounces+abe=debian.org@xxxxxxxxxxxxxxxxxxxxxxx
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 Ramacherdiff --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)"} esacAttachment: signature.asc
Description: Digital signature_______________________________________________ Pkg-zsh-devel mailing list Pkg-zsh-devel@xxxxxxxxxxxxxxxxxxxxxxx http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-zsh-devel
--- End Message ---