* Re: Bug#457981: zsh-beta: slow release completion of apt-get
[not found] <20071227122150.GA23485@alea.gnuu.de>
@ 2007-12-28 2:26 ` Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2007-12-28 2:26 UTC (permalink / raw)
To: Jörg Sommer, 457981; +Cc: zsh-workers
On Thu, Dec 27, 2007 at 01:21:50PM +0100, Jörg Sommer wrote:
> the completion of the release for apt-get install takes very long at me.
> I found in _apt apt-cache dump is used for getting the release names.
> This takes very long. Maybe you better use apt-cache policy.
>
> % apt-cache policy |sed '/release/!d; s/.*a=//; s/,.*//'
> now
> unstable
> grml-testing
> unstable
> unstable
> experimental
> mplayer
> unstable
> unstable
> unstable
I think there was a reason we didn't do this, but I suppose if it's
significant, someone will yell.
Index: Completion/Debian/Command/_apt
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_apt,v
retrieving revision 1.13
diff -u -r1.13 _apt
--- Completion/Debian/Command/_apt 4 Jul 2007 02:59:46 -0000 1.13
+++ Completion/Debian/Command/_apt 28 Dec 2007 02:22:19 -0000
@@ -551,7 +551,7 @@
_cache_invalid APT_releases ) && ! _retrieve_cache APT_releases;
then
_apt_releases=(
-${${${${(M)${(f)"$(apt-cache dump)"}:# #Archive:*}# #Archive: #}:#*\(null\)*}/ /}
+${${${${(M)${(f)"$(apt-cache policy)"}:#*release*}#*a=}%%,*}:#now}
)
typeset -U _apt_releases
_store_cache APT_releases _apt_releases
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-28 2:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20071227122150.GA23485@alea.gnuu.de>
2007-12-28 2:26 ` Bug#457981: zsh-beta: slow release completion of apt-get Clint Adams
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).