aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2011-02-08 16:38:07 +0000
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2011-02-08 16:38:07 +0000
commite61ee3561764da4ce246263644c0207f439c0be0 (patch)
treeb7611493ccd28bc866df856e42864f26e51f927e
parent4eb98040ac02186b9c2e9dd1f2cd5e7259f7b83b (diff)
downloadpaludis-e61ee3561764da4ce246263644c0207f439c0be0.tar.gz
paludis-e61ee3561764da4ce246263644c0207f439c0be0.tar.xz
Nothing uses _paludis_packages
-rw-r--r--zsh-completion/Makefile.am2
-rw-r--r--zsh-completion/_paludis_packages73
2 files changed, 1 insertions, 74 deletions
diff --git a/zsh-completion/Makefile.am b/zsh-completion/Makefile.am
index f5275c5..352cb54 100644
--- a/zsh-completion/Makefile.am
+++ b/zsh-completion/Makefile.am
@@ -1,5 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_DATA = _paludis_packages _cave
+noinst_DATA = _cave
EXTRA_DIST = $(noinst_DATA)
AUTOMAKE_OPTIONS = 1.11 parallel-tests
diff --git a/zsh-completion/_paludis_packages b/zsh-completion/_paludis_packages
deleted file mode 100644
index 8e70f31..0000000
--- a/zsh-completion/_paludis_packages
+++ /dev/null
@@ -1,73 +0,0 @@
-#autoload
-
-# 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|repository-formats
-
-local flags prepo packages categories
-_paludis_packages_update_available() {
- if [[ $PREFIX != -* ]]; then
- if [[ $PREFIX != */* ]];then
- if ( [[ ${+_paludis_pkgs_available} -eq 0 ]] || _cache_invalid PALUDIS_available ) && ! _retrieve_cache PALUDIS_available ; then
- _paludis_pkgs_available=(${(o)${${(M)${(f)"$(paludis --log-level silent --list-packages)"}:#\* *}##\* }##*/})
- _store_cache PALUDIS_available _paludis_pkgs_available
- fi
- _wanted paludis_pkgs expl "packages" compadd - ${(@)_paludis_pkgs_avail}
- categories=(${${(M)${(f)"$(paludis --log-level silent --list-categories)"}:#\* *}##\* })
- _wanted cat_packages expl "category/packages" compadd -S "/" $categories
- else
- compset -P '*/'
- packages=(${${${(M)${(f)"$(paludis --log-level silent --category ${IPREFIX//\//} --list-packages)"}:#\* *}##\* }//$IPREFIX/})
- _wanted cat_packages expl "category/packages" compadd ${(@)packages}
- fi
- fi
-}
-
-_paludis_packages_update_repository-formats() {
- packages=(${${(M)${(f)"$(paludis --log-level silent --list-repository-formats)"}:#\* *}##\* })
- compadd ${(@)packages}
-}
-
-_paludis_packages_update_installed() {
- if ( [[ ${+_paludis_pkgs_installed} -eq 0 ]] || _cache_invalid PALUDIS_installed ) && ! _retrieve_cache PALUDIS_installed ; then
- _paludis_pkgs_installed=(${${(M)${(f)"$(paludis --log-level silent --repository installed --list-packages)"}:#\* *}##\* })
- _store_cache PALUDIS_installed _paludis_pkgs_installed
- fi
- compadd ${(@)_paludis_pkgs_inst}
-}
-_paludis_packages_update_categories() {
- packages=(${${${(M)${(f)"$(paludis --log-level silent --list-categories)"}:#\* *}##\* }:#*(virtual|installed)*})
- compadd ${(@)packages}
-}
-_paludis_packages_update_repositories() {
- packages=(${${${(M)${(f)"$(paludis --log-level silent --list-repositories)"}:#\* *}##\* }:#*(virtual|installed)*})
- compadd ${(@)packages}
-}
-_paludis_packages_update_sets() {
- packages=(${${${(M)${(f)"$(paludis --log-level silent --list-sets)"}:#\* *}##\* }:#*(virtual|installed)*})
- compadd ${(@)packages}
-}
-_paludis_packages() {
- local command="$argv[$#]" expl cachevar pkgset update_policy
- zstyle -s ":completion:*:*:$service:*" cache-policy update_policy
- if [[ -z "$update_policy" ]]; then
- zstyle ":completion:*:*:$service:*" cache-policy _paludis_cache_policy
- fi
- [[ "$command" == (installed|available|categories|repositories|sets|repository-formats) ]] || {
- _message "unknown command: $command"
- return
- }
- [[ "$pkgset" == (installed|available|categories|repositories|sets|repository-formats) ]] || {
- pkgset="$command"
- }
- expl=("${(@)argv[1,-2]}")
- _paludis_packages_update_$pkgset
-}
-_paludis_cache_policy () {
- # Rebuild if cache is more than a week old
- oldp=( "$1"(mw+1) )
- (( $#oldp )) && return 0
-}
-
-_paludis_packages "$@"