* [PATCH 1/3] _apt: Complete 'apt-get download'.
@ 2016-05-09 22:16 Daniel Shahaf
2016-05-09 22:16 ` [PATCH 2/3] _apt: Complete releases by codename ('jessie', 'sid', etc) Daniel Shahaf
2016-05-09 22:16 ` [PATCH 3/3] _apt: Complete ${package}/${release} for 'source' and 'build-dep', too Daniel Shahaf
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Shahaf @ 2016-05-09 22:16 UTC (permalink / raw)
To: zsh-workers
---
Completion/Debian/Command/_apt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index 0bc20c6..d6429cb 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -462,7 +462,7 @@ _apt-get () {
/$'update\0'/ \| \
/$'upgrade\0'/ \| \
\( \
- /$'install\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
+ /$'install\0'\|$'download\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
/$'[^\0/]#/'/ /$'[^\0/]#\0'/ ':release name::_apt_releases' \) \| \
/$'remove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
/$'purge\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
@@ -478,7 +478,7 @@ _apt-get () {
/$'help\0/' \| \
/$'markauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
/$'unmarkauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
- /"[]"/ ':argument-1::compadd "$expl_action[@]" update upgrade install remove purge dist-upgrade dselect-upgrade clean autoclean changelog check source build-dep autoremove help markauto unmarkauto'
+ /"[]"/ ':argument-1::compadd "$expl_action[@]" update upgrade install remove purge dist-upgrade dselect-upgrade clean autoclean changelog check source build-dep autoremove help markauto unmarkauto download'
_apt-get () {
local expl_action expl_packages
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] _apt: Complete releases by codename ('jessie', 'sid', etc).
2016-05-09 22:16 [PATCH 1/3] _apt: Complete 'apt-get download' Daniel Shahaf
@ 2016-05-09 22:16 ` Daniel Shahaf
2016-05-09 22:16 ` [PATCH 3/3] _apt: Complete ${package}/${release} for 'source' and 'build-dep', too Daniel Shahaf
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Shahaf @ 2016-05-09 22:16 UTC (permalink / raw)
To: zsh-workers
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] _apt: Complete ${package}/${release} for 'source' and 'build-dep', too.
2016-05-09 22:16 [PATCH 1/3] _apt: Complete 'apt-get download' Daniel Shahaf
2016-05-09 22:16 ` [PATCH 2/3] _apt: Complete releases by codename ('jessie', 'sid', etc) Daniel Shahaf
@ 2016-05-09 22:16 ` Daniel Shahaf
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Shahaf @ 2016-05-09 22:16 UTC (permalink / raw)
To: zsh-workers
---
Completion/Debian/Command/_apt | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
index bde561a..8e74e66 100644
--- a/Completion/Debian/Command/_apt
+++ b/Completion/Debian/Command/_apt
@@ -462,7 +462,8 @@ _apt-get () {
/$'update\0'/ \| \
/$'upgrade\0'/ \| \
\( \
- /$'install\0'\|$'download\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
+ /$'install\0'\|$'download\0'\|$'source\0'\|$'build-dep\0'/ \
+ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \
/$'[^\0/]#/'/ /$'[^\0/]#\0'/ ':release name::_apt_releases' \) \| \
/$'remove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
/$'purge\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
@@ -472,8 +473,6 @@ _apt-get () {
/$'autoclean\0'/ \| \
/$'changelog\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
/$'check\0'/ \| \
- /$'source\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
- /$'build-dep\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" avail' \# \| \
/$'autoremove\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
/$'help\0/' \| \
/$'markauto\0'/ /$'[^\0]#\0'/ ':packages::_deb_packages "$expl_packages[@]" installed' \# \| \
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-09 22:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09 22:16 [PATCH 1/3] _apt: Complete 'apt-get download' Daniel Shahaf
2016-05-09 22:16 ` [PATCH 2/3] _apt: Complete releases by codename ('jessie', 'sid', etc) Daniel Shahaf
2016-05-09 22:16 ` [PATCH 3/3] _apt: Complete ${package}/${release} for 'source' and 'build-dep', too 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).