aboutsummaryrefslogtreecommitdiff
path: root/zsh-completion/_paludis_packages
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-30 08:46:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-30 08:46:21 +0000
commit9d1c6af800448fb0eb366513e99c1b24825111ad (patch)
treeb9628cb0c5ce0c57db7c583d7bd71a1effedb889 /zsh-completion/_paludis_packages
parentf06051f3a53253474298ddb0a5a2bd610ec605fb (diff)
downloadpaludis-9d1c6af800448fb0eb366513e99c1b24825111ad.tar.gz
paludis-9d1c6af800448fb0eb366513e99c1b24825111ad.tar.xz
Update zsh completion. From Baptiste Daroussin. Fixes: ticket:63
Diffstat (limited to 'zsh-completion/_paludis_packages')
-rw-r--r--zsh-completion/_paludis_packages12
1 files changed, 8 insertions, 4 deletions
diff --git a/zsh-completion/_paludis_packages b/zsh-completion/_paludis_packages
index ba5d7d3fb..ed7e57a66 100644
--- a/zsh-completion/_paludis_packages
+++ b/zsh-completion/_paludis_packages
@@ -3,7 +3,7 @@
# vim: set et sw=4 sts=4 ts=4 ft=zsh :
# ZSH completion utility functions for paludis
# Written by Baptiste Daroussin <baptux at free.fr>
-# Usage: _paludis_packages installed|available|repositories|categories|sets
+# Usage: _paludis_packages installed|available|repositories|categories|sets|repository-formats
local flags prepo packages categories
_paludis_packages_update_available() {
@@ -18,9 +18,13 @@ _paludis_packages_update_available() {
fi
}
+_paludis_packages_update_repository-formats() {
+ packages=(${${(M)${(f)"$(paludis --list-repository-formats)"}:#\* *}##\* })
+ compadd ${(@)packages}
+}
+
_paludis_packages_update_installed() {
packages=(${${(M)${(f)"$(paludis --repository installed --list-packages)"}:#\* *}##\* })
-
compadd ${(@)packages}
}
_paludis_packages_update_categories() {
@@ -41,11 +45,11 @@ _paludis_packages() {
if [[ -z "$update_policy" ]]; then
zstyle ":completion:*:*:$service:*" cache-policy _paludis_cache_policy
fi
- [[ "$command" == (installed|available|categories|repositories|sets) ]] || {
+ [[ "$command" == (installed|available|categories|repositories|sets|repository-formats) ]] || {
_message "unknown command: $command"
return
}
- [[ "$pkgset" == (installed|available|categories|repositories|sets) ]] || {
+ [[ "$pkgset" == (installed|available|categories|repositories|sets|repository-formats) ]] || {
pkgset="$command"
}
expl=("${(@)argv[1,-2]}")