|
|
_tags -s category && { compadd "$@" ${(kv)=category} } | _tags -s category && { compadd "$@" ${(kv)=category} } |
} | } |
| |
#Function to show only installed packages -- pkgname (no category or version #) |
|
_portage_installed(){ |
|
installed_portage=(/var/db/pkg/*-*/*) |
|
installed_pkgname=${(M)${${installed_portage##*/}%%-[0-9]*}} |
|
_tags -s installed_pkgname && { compadd "$@" ${(kv)=installed_pkgname} } |
|
} |
|
#moved out of equery | #moved out of equery |
_equery_val(){ | _equery_val(){ |
_values "equery actions" \ | _values "equery actions" \ |
|
|
'size[print size of files contained in package]' | 'size[print size of files contained in package]' |
} | } |
| |
#Function to show all available portage names |
|
_portage_pkglist(){ |
|
portage_pkglist="$portage_pkglist" |
|
_tags -s portage_pkglist && { compadd "$@" ${(kv)=portage_pkglist} } |
|
_path_files -/ -F "*CVSROOT" -F "*eclass" -F "*distfiles" -F "*licences" -W "${portdir}" |
|
} |
|
|
|
#Reading informations from Portage | #Reading informations from Portage |
# | # |
# Using portageq is the right way to get PORTDIR, but it is very slow :-( | # Using portageq is the right way to get PORTDIR, but it is very slow :-( |
|
|
done | done |
fi | fi |
| |
portage_pkglist=(${portdir}/*-*/* ${portdir_overlay}/*-*/*) |
#portage_pkglist=(${portdir}/*-*/* ${portdir_overlay}/*-*/*) |
portage_pkglist=(${portage_pkglist##*/}) |
#portage_pkglist=(${portage_pkglist##*/}) |
| |
| |
case $service in | case $service in |
|
|
"($excl --uninstalled -U --installed -I $dups -d)"{--installed,-I}"[include only installed packages]" \ | "($excl --uninstalled -U --installed -I $dups -d)"{--installed,-I}"[include only installed packages]" \ |
"($excl --group -g $dups -d)"{--group,-g}"[find by group]:group:_category" \ | "($excl --group -g $dups -d)"{--group,-g}"[find by group]:group:_category" \ |
"($check $excl --list -l $dups -d)"{--list,-l}"[list package contents]" \ | "($check $excl --list -l $dups -d)"{--list,-l}"[list package contents]" \ |
"($excl --info -i $dups -d 1)"{--info,-i}"[get package description and home page]:package:_portage_pkglist" \ |
"($excl --info -i $dups -d 1)"{--info,-i}"[get package description and home page]:package:_gentoo_packages available" \ |
"($excl $check $find $dups --uninstalled -U)"{--check-time,-ct}"[verify package file timestamps]" \ | "($excl $check $find $dups --uninstalled -U)"{--check-time,-ct}"[verify package file timestamps]" \ |
"($excl $check $find $dups --uninstalled -U)"{--check-md5,-cm}"[verify package files md5]" \ | "($excl $check $find $dups --uninstalled -U)"{--check-md5,-cm}"[verify package files md5]" \ |
"($excl $check $find $dups --uninstalled -U)"{--check,-c}"[verify mtimes and md5]" \ | "($excl $check $find $dups --uninstalled -U)"{--check,-c}"[verify mtimes and md5]" \ |
"($excl $find --query-deps -q $dups -d 1)"{--query-deps,-q}"[display all installed packages depending on selected packages]:package:_portage_pkglist" \ |
"($excl $find --query-deps -q $dups -d 1)"{--query-deps,-q}"[display all installed packages depending on selected packages]:package:_gentoo_packages available" \ |
"()"{--no-color,-nc}"[dont use colors]" \ | "()"{--no-color,-nc}"[dont use colors]" \ |
"*--verbose[be more verbose (2 levels)]" \ | "*--verbose[be more verbose (2 levels)]" \ |
"*-v[be more verbose (2 levels)]" \ | "*-v[be more verbose (2 levels)]" \ |
"($excl --non-masked -n --masked -m $dups)"{--masked,-m}"[include only masked packages]" \ | "($excl --non-masked -n --masked -m $dups)"{--masked,-m}"[include only masked packages]" \ |
"($excl --non-masked -n --masked -m $dups)"{--non-masked,-n}"[include only non-masked packages]" \ | "($excl --non-masked -n --masked -m $dups)"{--non-masked,-n}"[include only non-masked packages]" \ |
"(- :)"{--help,-h}"[show help]" \ | "(- :)"{--help,-h}"[show help]" \ |
"(--info -i --query-deps -q --slot -s)1:package:_portage_installed" |
"(--info -i --query-deps -q --slot -s)1:package:_gentoo_packages installed" |
;; | ;; |
| |
equery) | equery) |
|
|
'--timestamp[append timestamp]' \ | '--timestamp[append timestamp]' \ |
'--md5sum[append md5sum]' \ | '--md5sum[append md5sum]' \ |
'--type[prepend file type]' \ | '--type[prepend file type]' \ |
'*:installed pkgname:_portage_installed' && return 0 |
'*:installed pkgname:_gentoo_packages installed' && return 0 |
;; | ;; |
belongs|--earlyout) | belongs|--earlyout) |
_arguments -s \ | _arguments -s \ |
|
|
'(-I --exclude-installed -i --installed)'{-I,--exclude-installed}'[do not search installed packages]' \ | '(-I --exclude-installed -i --installed)'{-I,--exclude-installed}'[do not search installed packages]' \ |
'(-p --portage)'{-p,--portage-tree}'[also search in portage tree]' \ | '(-p --portage)'{-p,--portage-tree}'[also search in portage tree]' \ |
'(-o --overlay-tree)'{-o,--overlay-tree}'[also search in overlay tree]' \ | '(-o --overlay-tree)'{-o,--overlay-tree}'[also search in overlay tree]' \ |
'*:package:_portage_installed' && return 0 |
'*:package:_gentoo_packages installed' && return 0 |
;; | ;; |
uses|which) | uses|which) |
_arguments \ | _arguments \ |
'*:package:_portage_pkglist' \ |
'*:package:_gentoo_packages available' \ |
&& return 0 | && return 0 |
;; | ;; |
depgraph|-U|--no-useflags|-l|--linear) | depgraph|-U|--no-useflags|-l|--linear) |
_arguments -s \ | _arguments -s \ |
'(-U --no-useflags)'{-U,--no-useflags}'[do not show USE flags]' \ | '(-U --no-useflags)'{-U,--no-useflags}'[do not show USE flags]' \ |
'(-l --linear)'{-l,--linear}'[do not use fancy formatting]' \ | '(-l --linear)'{-l,--linear}'[do not use fancy formatting]' \ |
'*:package:_portage_installed' \ |
'*:package:_gentoo_packages installed' \ |
&& return 0 | && return 0 |
;; | ;; |
size|-b|--bytes) | size|-b|--bytes) |
_arguments -s \ | _arguments -s \ |
'(-b --bytes)'{-b,--bytes}'[report size in bytes]' \ | '(-b --bytes)'{-b,--bytes}'[report size in bytes]' \ |
'*:package:_portage_installed' \ |
'*:package:_gentoo_packages installed' \ |
&& return 0 | && return 0 |
;; | ;; |
check) | check) |
_arguments -s \ | _arguments -s \ |
'*:package:_portage_installed' \ |
'*:package:_gentoo_packages installed' \ |
&& return 0 | && return 0 |
;; | ;; |
--nocolor|-C|--quiet|-q) | --nocolor|-C|--quiet|-q) |