aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2013-02-06 15:22:47 -0800
committerTim Harder <radhermit@gentoo.org>2013-02-06 15:22:47 -0800
commitaab7e2303cba8ea74092f812137c2f9ad584351d (patch)
tree5fd20479b39b5cf720203dc3dab9522d7f8ff483
parentImport 20091203 (diff)
downloadzsh-completion-aab7e2303cba8ea74092f812137c2f9ad584351d.tar.gz
zsh-completion-aab7e2303cba8ea74092f812137c2f9ad584351d.tar.bz2
zsh-completion-aab7e2303cba8ea74092f812137c2f9ad584351d.zip
eix optionally installs its own zsh completion files now
-rw-r--r--_eix193
1 files changed, 0 insertions, 193 deletions
diff --git a/_eix b/_eix
deleted file mode 100644
index 07726ef..0000000
--- a/_eix
+++ /dev/null
@@ -1,193 +0,0 @@
-#compdef eix
-
-# options from eix --help
-# eix 0.10.3 (gcc-4.2.2, x86_64-pc-linux-gnu)
-#
-
-
-# category of options
-local global_exclusives_opts \
- global_special \
- global_output \
- local_misc \
- local_search_field \
- local_type_of_pattern
-
-global_exclusives_opts=(
- {'(--help)-h','(-h)--help'}'[show help and exit]'
- {'(--version)-V','(-V)--version'}'[show version and exit]'
- '--dump[dump variables to stdout]'
- '--dump-defaults[dump default values of variables]'
- '--print[print the expanded value of a variable]'
- '--print-all-useflags[print all IUSE words used in some version]'
- '--print-all-keywords[print all KEYWORDS used in some version]'
- '--print-all-slots[print all SLOT strings used in some version]'
- '--print-all-provides[print all PROVIDE strings used in some package]'
- '--print-all-licenses[print all LICENSE strings used in some package]'
- '--print-world-sets[print the world sets]'
- '--print-overlay-path[print the path of specified overlay]'
- '--print-overlay-label[print label of specified overlay]'
-)
-
-global_special=(
- {'(--test-non-matching)-t','(-t)--test-non-matching'}'[print non-matching entries of /etc/portage/package.* and non-matching names of installed packages]'
- {'(--quick)-Q','(-Q)--quick'}"[(toggle) don't read unguessable slots of installed packages]"
- '--care[always read slots of installed packages]'
- '--cache-file[use another cache-file instead of /var/cache/eix]'
-)
-
-global_output=(
- {'(--quiet)-q','(-q)--quiet'}'[(toggle) (no) output]'
- {'(--nocolor)-n','(-n)--nocolor'}'[do not use ANSI color codes]'
- {'(--force-color)-F','(-F)--force-color'}'[force colorful output]'
- {'(--pure-packages)-\\*','(-\\*)--pure-packages'}'[Omit printing of overlay names and package number]'
- '--only-names[print with format <category>/<name>]'
- {'(--compact)-c','(-c)--compact'}'[(toggle) compact search results]'
- {'(--verbose)-v','(-v)--verbose'}'[(toggle) verbose search results]'
- {'(--versionsort)-x','(-x)--versionsort'}'[(toggle) sort output by slots/versions]'
- {'(--versionlines)-l','(-l)--versionlines'}'[(toggle) print available versions line-by-line]' \
- '--format[format string for normal output]'
- '--format-compact[format string for compact output]'
- '--format-verbose[format string for verbose outp]'
-)
-
-local_misc=(
- {'(--installed)-I','(-I)--installed'}'[Next expression only matches installed packages]'
- {'(--multi-installed)-i','(-i)--multi-installed'}'[Match packages installed in several versions]'
- {'(--dup-packages)-d','(-d)--dup-packages'}'[Match duplicated packages]'
- {'(--dup-versions)-D','(-D)--dup-versions'}'[Match packages with duplicated versions]'
- {'(--slotted)-1','(-1)--slotted'}'[Match packages with a nontrivial slot]'
- {'(--slots)-2','(-2)--slots'}'[Match packages with two different slots]'
- {'(--upgrade)-u','(-u)--upgrade'}'[Match packages without best slotted version]'
- '--stable[Match packages with a stable version]'
- '--testing[Match packages with a testing or stable version]'
- '--non-masked[Match packages with a non-masked version]'
- '--system[Match system packages]'
- '--installed-unstable[Match packages with a non-stable installed version]'
- '--installed-testing[Match packages with a testing installed version]'
- '--installed-masked[Match packages with a masked installed version]'
- '--world[Match world packages]'
- '--world-all[Match packages of world or of a world set]'
- '--world-set[Match packages of a world set]'
- {'(--overlay)-O','(-O)--overlay'}'[Match packages from overlays]'
- '--in-overlay[OVERLAY Match packages from OVERLAY]'
- '--only-in-overlay[OVERLAY Match packages only in OVERLAY]'
- {'(--installed-overlay)-J','(-J)--installed-overlay'}'[Match packages installed from overlays]'
- '--installed-from-overlay[OVERLAY Packages installed from OVERLAY]'
- '--installed-in-some-overlay[Packages with an installed version provided by some overlay]'
- '--installed-in-overlay[OVERLAY Packages with an installed version provided from OVERLAY]'
- '--restrict-fetch[Match packages with a fetch restriction]'
- '--restrict-mirror[Match packages with a mirror restriction]'
- '--restrict-primaryuri[Match packages with RESTRICT=primaryuri]'
- '--restrict-binchecks[Match packages with RESTRICT=binchecks]'
- '--restrict-strip[Match packages with RESTRICT=strip]'
- '--restrict-test[Match packages with RESTRICT=test]'
- '--restrict-userpriv[Match packages with RESTRICT=userpriv]'
- '--restrict-installsources[Match packages with RESTRICT=installsources]'
- '--restrict-bindist[Match packages with RESTRICT=bindist]'
- '--properties-interactive[Match packages with PROPERTIES=interactive]'
- '--properties-live[Match packages with PROPERTIES=live]'
- '--properties-virtual[ Match packages with PROPERTIES=virtual]'
- '--properties-set[Match packages with PROPERTIES=set]'
- {'(--test-obsolete)-T','(-T)--test-obsolete'}'[Match packages with obsolete entries in /etc/portage/package.*]'
- {'(--not)-!','(-!)--not'}'[(toggle) Invert the expression]'
- {'(--pipe)-\\|','(-\\|)--pipe'}'[Use input from pipe of emerge -pv]'
-)
-
-local_search_field=(
- {'(--description)-S','(-S)--description'}'[description]'
- {'(--category-name)-A','(-A)--category-name'}'["category/name"]'
- {'(--category)-C','(-C)--category'}'[category]'
- {'(--name)-s','(-s)--name'}'[name (default)]'
- {'(--homepage)-H','(-H)--homepage'}'[homepage]'
- {'(--license)-L','(-L)--license'}'[license]'
- {'(--provide)-P','(-P)--provide'}'[provides]'
- {'(--use)-U','(-U)--use'}'[useflag (of the ebuild)]'
- '--installed-with-use[enabled useflag (of installed package)]'
- '--installed-without-use[disabled useflag (of installed package)]'
-)
-
-local_type_of_pattern=(
- {'(--regex)-r','(-r)--regex'}'[Pattern is a regexp (default)]'
- {'(--exact)-e','(-e)--exact'}'[Pattern is the exact string]'
- {'(--substring)-z','(-z)--substring'}'[Pattern is a substring]'
- {'(--begin)-b','(-b)--begin'}'[Pattern is the beginning of the string]'
- '--end[Pattern is the end of the string]'
- {'(--pattern)-p','(-p)--pattern'}'[Pattern is a wildcards-pattern]'
- {'(--fuzzy)-f','(-f)--fuzzy'}'[Use fuzzy-search with a max. levenshtein-distance m (default: 2)]'
-)
-
-
-local prev="$words[CURRENT-1]" # previous word
-local _gentoo_packages_scope # used to restrict the package scope (installed,category,useflag...)
-
-# global exclusiv opts, no more completion.
-if (( $words[(I)(-[[:alnum:]]#(h|V)[[:alnum:]]#|--(help|version|dump|dump-defaults))] )); then
- return 0
-# already have a --print ARG option. no more completion.
-elif (( $words[(I)(--print)] )) && [[ "$prev" != '--print' ]]; then
- return 0
-else
- case "$prev" in
-# eix variables for --print
- '--print' )
- local vars
- vars=(${${(M)${(f)"$(eix --dump)"}##[A-Z]*}%%\=*})
- _values 'variables' $vars
- return 0
- ;;
-
-# files for --cache-file
- '--cache-file' )
- _arguments -s '*:filename:_files'
- return 0
- ;;
-
-# overlays for --only-in-overlay|--in-overlay|--installed-from-overlay|--installed-in-overlay
- --((only-|)in|installed-(from|in))-overlay )
- for f in /etc/make.conf /etc/make.globals; do
- [[ -z "$PORTDIR_OVERLAY" && -r "$f" ]] &&
- local PORTDIR_OVERLAY="`. "$f" 2>/dev/null; echo ${PORTDIR_OVERLAY}`"
- done
-
- _values 'overlays' $=PORTDIR_OVERLAY
- return 0
- ;;
-
-# useflags for -U|--use|--installed-with-use|--installed-without-use
- (-[[:alnum:]]#U|--(use|installed-with(out|)-use)) )
- _gentoo_packages_scope='*:package:_gentoo_packages useflag'
- ;;
-
-# category for -C|--category
- -([[:alnum:]]#C|-category) )
- _gentoo_packages_scope='*:package:_gentoo_packages category'
- ;;
-
- * )
- #if (( $words[(I)(-[[:alnum:]]#2[[:alnum:]]#|--slots)] )); then
- # local pkgs
- # pkgs=(${${(f)"$(eix -2 --only-names)"}##*/})
- # _values 'packages' $pkgs && return 0
-
- # installed packages for -i|--installed|-I|--multi-installed|-T|--test-obsolete
- if (( $words[(I)(-[[:alnum:]]#(i|I|T)[[:alnum:]]#|--(((multi-|)installed)|test-obsolete))] )); then
- _gentoo_packages_scope='*:package:_gentoo_packages installed'
- # only packages names (no category) for -s|--name
- elif (( $words[(I)(-[[:alnum:]]#s[[:alnum:]]#|--name)] )); then
- _gentoo_packages_scope='*:package:_gentoo_packages available_pkgnames_only'
- else # default
- _gentoo_packages_scope='*:package:_gentoo_packages available'
- fi
- ;;
- esac
-fi
-
-_arguments -s $global_exclusives_opts \
- $global_special \
- $global_output \
- $local_misc \
- $local_search_field \
- $local_type_of_pattern \
- $_gentoo_packages_scope &&
- return 0