Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/3] _apt: Complete releases by codename ('jessie', 'sid', etc).
- X-seq: zsh-workers 38452
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 2/3] _apt: Complete releases by codename ('jessie', 'sid', etc).
- Date: Mon, 9 May 2016 22:16:03 +0000
- In-reply-to: <1462832164-4972-1-git-send-email-danielsh@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1462832164-4972-1-git-send-email-danielsh@tarsus.local2>
---
Completion/Debian/Command/_apt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index d6429cb..bde561a 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -592,8 +592,10 @@ _apt_releases_update () {
if ( [[ ${+_apt_releases} -eq 0 ]] ||
_cache_invalid APT_releases ) && ! _retrieve_cache APT_releases;
then
+ local -a tmp=("${(f)$(apt-cache policy)}")
_apt_releases=(
-${${${${(M)${(f)"$(apt-cache policy)"}:#*release*}#*a=}%%,*}:#now}
+${${${${(M)tmp:#*release*}#*a=}%%,*}:#now}
+${${${${(M)tmp:#*release*n=*}#*n=}%%,*}:#now}
)
typeset -U _apt_releases
_store_cache APT_releases _apt_releases
Messages sorted by:
Reverse Date,
Date,
Thread,
Author