zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _apt: Fix completion of target_release names, e.g., 'apt install zsh/<TAB>'.
@ 2017-12-30  6:13 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2017-12-30  6:13 UTC (permalink / raw)
  To: zsh-workers

When local-apt-repository is installed, 'apt-cache policy' contains
.
     100 /var/lib/dpkg/status
         release a=now
     500 file:/var/lib/local-apt-repository ./ Packages
         release o=local-apt-repository,c=
.
which was matched by the pattern being patched.
---
 Completion/Debian/Command/_apt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index 074fb0164..aabe03d3c 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -609,7 +609,7 @@ _apt_releases_update () {
   then
     local -a tmp=("${(f)$(apt-cache policy)}")
     _apt_releases=(
-${${${${(M)tmp:#*release*}#*a=}%%,*}:#now}
+${${${${(M)tmp:#*release*a=*}#*a=}%%,*}:#now}
 ${${${${(M)tmp:#*release*n=*}#*n=}%%,*}:#now}
     )
     typeset -U _apt_releases


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

only message in thread, other threads:[~2017-12-30  6:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-30  6:13 [PATCH] _apt: Fix completion of target_release names, e.g., 'apt install zsh/<TAB>' Daniel Shahaf

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