aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorManuel Rüger <manuel@rueg.eu>2014-08-09 18:01:24 +0200
committerManuel Rüger <manuel@rueg.eu>2014-08-09 18:01:24 +0200
commit56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032 (patch)
tree3ecfcb8e9894329f805517cdd22ee4a372e26fc9 /src
parenttypo (diff)
downloadzsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.tar
zsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.tar.gz
zsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.tar.bz2
zsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.tar.lz
zsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.tar.xz
zsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.tar.zst
zsh-completions-56e55bb3eeefb41c9da1e0d22bbe4f2ea3a8a032.zip
Remove Gentoo's completions according to the project's rules. They are maintained upstream: https://github.com/gentoo/gentoo-zsh-completions
Diffstat (limited to 'src')
-rw-r--r--src/_baselayout168
-rw-r--r--src/_eselect246
-rw-r--r--src/_gcc-config78
-rw-r--r--src/_genlop155
-rw-r--r--src/_gentoo_packages245
-rw-r--r--src/_gentoolkit410
-rw-r--r--src/_layman103
-rw-r--r--src/_portage358
-rw-r--r--src/_portage_utils197
9 files changed, 0 insertions, 1960 deletions
diff --git a/src/_baselayout b/src/_baselayout
deleted file mode 100644
index 1e99e9a..0000000
--- a/src/_baselayout
+++ /dev/null
@@ -1,168 +0,0 @@
-#compdef rc-update rc-status rc rc-service
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for Gentoo Baselayout v2 and OpenRC v0.8 (init system).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Vadim A. Misbakh-Soloviov <mva@mva.name>
-# * Bapt <bapt@tuxfamily.org>
-# * kaworu <kaworu@kaworu.ch>
-# * David Durrleman <dualmoo@gmail.com>
-# * oberyno <oberyno@gmail.com>
-# * Mamoru Komachi <usata@usata.org>
-#
-# ------------------------------------------------------------------------------
-#<sys-apps/baselayout-1.12.11.1>
-#
-# Status:
-# rc (fully done)
-# rc-update (fully done)
-# rc-status (fully done)
-# rc-service (to be improved)
-
-
-local gentoo_runlevels
-gentoo_runlevels=(/etc/runlevels/*(:t))
-
-
-# Stuff for rc
-_rc () {
- if (( CURRENT == 2 )); then
- _values 'runlevels' $gentoo_runlevels
- fi
-}
-
-_rc_list_service () {
- local servicelist
- servicelist=(${(f)"$(/sbin/rc-service -Cl 2>/dev/null)"})
- _values 'services' $servicelist
-}
-# Stuff for rc-service
-_rc-service () {
- servicelist=${(f)"$(/sbin/rc-service -Cl 2>/dev/null)"}
- if (( CURRENT == 2 ));then
- _arguments -s \
- '(-e --exists)'{-e,--exists}"[tests if the service exists or not]" \
- '(-l --list)'{-l,--list}'[list all available services]' \
- '(-r --resolve)'{-r,--resolve}'[resolve the service name to an init script]' \
- '(-C --nocolor)'{-C,--nocolor}'[Disable color output]' \
- '(-v --verbose)'{-v,--verbose}'[Run verbosely]' \
- '(-q --quiet)'{-q,--quiet}'[Run quietly]'
- _rc_list_service
- else
- case $words[2] in
- -e|--exists|-r|--resolve)
- (( CURRENT > 3 )) && return 0
- _rc_list_service
- ;;
- -*)
- return 0
- ;;
- *)
- _values "action" stop start restart describe zap
- ;;
- esac
- fi
-}
-
-# Stuff for rc-status
-_rc-status () {
- _arguments -s \
- '(-a --all)'{-a,--all}'[Show services at all run levels]' \
- '(-l --list)'{-l,--list}'[Show list of run levels]' \
- '(-nc --nocolor)'{-nc,--nocolor}'[Disable color output]' \
- '(-s --servicelist)'{-s,--servicelist}'[Show all services]' \
- '(-u --unused)'{-u,--unused}'[Show services not assigned to any run level]'
-
- _values 'runlevels' $gentoo_runlevels
-}
-
-
-# Stuff for rc-update
-_rc-update () {
- local used_init
-
- # FIXME: ${=${(f)"$(rc-update show 2>/dev/null)"}% |*} yield the same result (for me).
- # we probably don't need any more the (M) matcher part.
- used_init=(${=${(M)${(f)"$(/sbin/rc-update show 2>/dev/null)"}:#*|*[a-z]*}% |*})
-
- if (( CURRENT == 2 )); then
- _values 'rc-update actions' \
- 'add[Add script to a runlevel]' \
- 'del[Delete script from a runlevel]' \
- 'show[Show scripts lanched at a runlevel]' \
- '-a[Add script to a runlevel]' \
- '-d[Delete script from a runlevel]' \
- '-s[Show scripts lanched at a runlevel]'
- elif (( CURRENT == 3 )); then
- case "$words[2]" in
- add|-a)
- _values 'scripts' /etc/init.d/*~*.sh(:t)
- ;;
- del|-d)
- _values 'scripts' $used_init
- ;;
- show|-s)
- _values 'runlevels' $gentoo_runlevels \
- '-v[Show all init scripts]' \
- '--verbose[Show all init scripts]'
- ;;
- esac
- elif (( CURRENT == 4 )); then
- _values 'runlevels' $gentoo_runlevels
- fi
-}
-
-
-case "$service" in
- rc-update)
- _rc-update "$@" && return 0
- ;;
- rc-service)
- _rc-service "$@" && return 0
- ;;
- rc-status)
- _rc-status "$@" && return 0
- ;;
- rc)
- _rc "$@" && return 0
- ;;
-esac
-
-# Local Variables:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_eselect b/src/_eselect
deleted file mode 100644
index 8e57fc9..0000000
--- a/src/_eselect
+++ /dev/null
@@ -1,246 +0,0 @@
-#compdef eselect
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for Eselect (symlink manager for multiversioning
-# and multibranding support for some libraries and binaries).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Vadim A. Misbakh-Soloviov <mva@mva.name>
-# * Bapt <bapt@tuxfamily.org>
-# * kaworu <kaworu@kaworu.ch>
-# * David Durrleman <dualmoo@gmail.com>
-# * oberyno <oberyno@gmail.com>
-# * Mamoru Komachi <usata@usata.org>
-#
-# ------------------------------------------------------------------------------
-#<app-admin/eselect-1.0.11>
-#
-
-_eselect_env() {
- if (( $words[(I)(update)] )); then
- _values 'update options' \
- 'makelinks[force updating of links]' \
- 'noldconfig[Do not alter the ld.so cache or configuration]' && return 0
- fi
- _values 'env options' $stdopts[@] \
- 'update[Collect environment variables from all scripts]' && return 0
-}
-
-_eselect_binutils() {
- local binutilslist
- if (( $words[(I)(set)] )); then
- binutilslist=(${${${(M)${(f)"$(eselect --colour=no binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values 'available binutils version' $binutilslist[@] && return 0
- fi
- _values 'binutils options' $stdopts[@] \
- 'list[List all installed version of binutils]' \
- 'show[Print the currently active binutils version]' \
- 'set[Activate one of the installed binutils]' && return 0
-}
-
-_eselect_kernel() {
- local kernellist
- if (( $words[(I)(set)] )); then
- kernellist=(${${${(M)${(f)"$(eselect --colour=no kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values 'available kernel version' $kernellist[@] && return 0
- fi
- _values 'kernel options' $stdopts[@] \
- 'list[List available kernel symlink targets]' \
- 'show[Show the current kernel symlink]' \
- 'set[Set a new kernel symlink target]' && return 0
-}
-_eselect_ctags() {
- local ctagslist
- if (( $words[(I)(set)] )); then
- ctagslist=(${${${(M)${(f)"$(eselect --colour=no ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values 'available ctags version' $ctagslist[@] && return 0
- fi
- _values 'ctags options' $stdopts[@] \
- 'list[List available ctags symlink targets]' \
- 'show[Show the current target of the ctags symlink]' \
- 'update[Automatically update the ctags symlink]' \
- 'set[Set a new ctags symlink target]' && return 0
-}
-_eselect_profile() {
- local profilelist
- if (( $words[(I)(set)] )); then
- profilelist=(${${${(M)${(f)"$(eselect --colour=no profile list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values -w 'available profiles' $profilelist[@] \
- '--force[Forcibly set the symlink]' && return 0
- fi
- _values 'profile options' $stdopts[@] \
- 'list[List available profile symlink targets]' \
- 'show[Show the current make.profile symlink]' \
- 'set[Set a new profile symlink target]' && return 0
-}
-_eselect_fontconfig() {
- local fclistenabled fclistdisabled
- if (( $words[(I)(enable)] )); then
- fclistdisabled=(${${${${(M)${(f)"$(eselect --colour=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
- _values -w '.conf to enable' $fclistdisabled[@] && return 0
- elif (( $words[(I)(disable)] )); then
- fclistenabled=(${${${(M)${(M)${(f)"$(eselect --colour=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
- _values -w '.conf to disable' $fclistenabled[@] && return 0
- fi
- _values 'fontconfig options' $stdopts[@] \
- 'list[List available fontconfig .conf files]' \
- 'disable[Disable specified fontconfig .conf file(s)]' \
- 'enable[Enable specified fontconfig .conf file(s)]' && return 0
-}
-_eselect_opengl() {
- local opengllist
- if (( $words[(I)(set)] )); then
- opengllist=(${${${(M)${(f)"$(eselect --colour=no opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values -w 'opengl implementations and options' $opengllist[@] \
- '--use-old[If an implementationis already set, use that one instead]' \
- '--prefix[Set the source prefix]:path:_files -/' \
- '--dst-prefix[Set the destination prefix]:path:_files -/' \
- '--impl-headers[Override global headers with ones provided by this profile]' && return 0
- fi
- _values 'opengl options' $stdopts[@] \
- 'list[List the available OpenGL implementations]' \
- 'set[Select the OpenGL implementation]' \
- 'show[Print the current OpenGL implementation]' && return 0
-}
-_eselect_vi() {
- local vilist
- if (( $words[(I)(set)] )); then
- vilist=(${${${(M)${(f)"$(eselect --colour=no vi list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values -w 'vi implementation' $vilist[@] && return 0
- elif (( $words[(I)(update)] )); then
- _values -w 'option' '--if-unset[Do not override existing implementation]' && return 0
- fi
- _values 'vi options' $stdopts[@] \
- 'list[List available vi implementations]' \
- 'set[Set a new vi implementation provider]' \
- 'show[Show the current vi implementation]' \
- 'update[Automatically update the vi provider]' && return 0
-}
-
-_eselect_news() {
-
- ##
- ## TODO: Normal numeric sorting.
- ## I've spent all the day (12.11.2013) on trying to rewrite this
- ## function to normally sort (to DO NOT sort, actually) news,
- ## but it start to grow to very big size and going to be too
- ## complicated.
- ## So, I either need to help to do it normally, or to completely
- ## rewrite this compdef.
- ##
-
- local -a newslist;
- if ((CURRENT == 3)); then
- _values 'news options' $stdopts[@] \
- 'list[List news items]' \
- 'count[Display number of news items]' \
- 'purge[Purge read news]' \
- 'read[Read news items]' \
- 'unread[Mark read news items as unread again]' && return 0
- elif ((CURRENT == 4)); then
- if (( $words[(I)(count)] )); then
- _values -w 'news' 'new[Count only new news items]' 'all[Count all news items]' && return 0
- fi
-
- newslist=(${${${${${${${(M)${(f)"$(eselect --colour=no news list)"}## *}// \**/}/ \[/}/\] ##/\[}/%/]}/ \[/ (}/\] /) })
-
- if (( $words[(I)(read)] )); then
- newslist+=( "new[Read unread news items (default)]" "all[Read all news items]" "--mbox[Output in mbox format]" "--quiet[Suppress output, only change status]" "--raw[Output in raw format]" )
- fi;
-
- if (( $words[(I)(unread)] )); then
- newslist+=( "all[Unread all news items]" )
- fi
-
- _values -w 'news' $newslist[@] && return 0
- fi
-}
-_eselect() {
- local globopts sedcmd modnames modopts
- local stdopts
- stdopts=(
- 'help[Display help text]'
- 'usage[Display usage information]'
- 'version[Display version information]'
- )
- globopts=(
- '--brief[Make output shorter]'
- '--colour=no[Disable colour output (default "auto")]'
- '--colour=yes[Enable colour output (default "auto")]'
- )
- modnames=(${${${(M)${(f)"$(eselect --colour=no modules list)"}## *}// */}// /})
- if ((CURRENT == 2)); then
- _arguments -s \
- "$globopts[@]" \
- "*:portage:_values 'eselect modules' \$modnames[@]" && return 0
- elif ((CURRENT == 3)); then
- if [[ $words[2] =~ "--colour" || $words[2] =~ "--brief" ]]; then
- _arguments -s \
- "*:portage:_values 'eselect modules' \$modnames[@]" && return 0
- elif (( $modnames[(I)$words[2]] )); then
- if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi|news) ]]; then
- _eselect_$words[2] "$@"
- else
- modopts=(${${${${(M)${(f)"$(eselect --colour=no $words[2] usage)"}## *}// */}// /}// */})
- _arguments -s \
- "*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0
- fi
- fi
- elif ((CURRENT >= 4)); then
- if (( $words[(I)(--colour=no|--colour=yes|--brief)] )); then
- if (( $modnames[(I)$words[3]] )); then
- if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi|news) ]]; then
- _eselect_$words[3] "$@"
- else
- modopts=(${${${${(M)${(f)"$(eselect --colour=no $words[3] usage)"}## *}// */}// /}// *})
- _arguments -s \
- "*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0
- fi
- fi
- else
- if (( $modnames[(I)$words[2]] )); then
- (( $+functions[_eselect_$words[2]] )) && _eselect_$words[2] "$@"
- fi
- fi
- fi
-}
-
-_eselect "$@"
-
-# Local Variables:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_gcc-config b/src/_gcc-config
deleted file mode 100644
index 16d4f73..0000000
--- a/src/_gcc-config
+++ /dev/null
@@ -1,78 +0,0 @@
-#compdef gcc-config
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for GCC config script (symlink manager for multiversioning).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Vadim A. Misbakh-Soloviov <mva@mva.name>
-# * Bapt <bapt@tuxfamily.org>
-# * kaworu <kaworu@kaworu.ch>
-# * David Durrleman <dualmoo@gmail.com>
-# * oberyno <oberyno@gmail.com>
-# * Mamoru Komachi <usata@usata.org>
-#
-# ------------------------------------------------------------------------------
-#<sys-devel/gcc-config-0.0>
-
-local arguments
-
-arguments=(
- '(- :)'{--use-old,-O}'[use the old profile if one was selected]'
- '(- :)'{--use-portage-chost,-P}'[only set profile if its CHOST matches /etc/{portage/}make.conf]:profiles:_gcc_profile'
- '(- :)'{--get-current-profile,-c}'[print current used gcc profile]'
- '(- :)'{--list-profiles,-l}'[print a list of available profiles]'
- '(- :)'{--print-environ,-E}'[print environment of the given/current profile]:profiles:_gcc_profile'
- '(- :)'{--get-bin-path,-B}'[print binary path of given/current profile]:profiles:_gcc_profile'
- '(- :)'{--get-lib-path,-L}'[print library path of given/current profile]:profiles:_gcc_profile'
- '(- :)'{--get-stdcxx-incdir,-X}'[print g++ include path of given/current profile]:profiles:_gcc_profile'
- '(- :)'{--help,-h}'[show help]'
- '(- :)'{--version,-v}'[show version info]'
- '(- :):profiles:_gcc_profile'
-)
-
-_gcc_profile () {
- local profile
- profile=(${(f)"$(_call_program gcc-installed RC_NOCOLOR=yes gcc-config --list-profiles)"})
- profile=${${profile/\[([^]]*)\]/}/\*}
- _tags profile && { compadd "$@" -k profile || compadd "$@" ${(kv)=profile} }
-}
-
-_arguments $arguments
-
-# Local Variables:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_genlop b/src/_genlop
deleted file mode 100644
index 02c3fd6..0000000
--- a/src/_genlop
+++ /dev/null
@@ -1,155 +0,0 @@
-#compdef genlop
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for GenLop (Gentoo Installation log parser).
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Vadim A. Misbakh-Soloviov <mva@mva.name>
-# * Bapt <bapt@tuxfamily.org>
-# * kaworu <kaworu@kaworu.ch>
-# * David Durrleman <dualmoo@gmail.com>
-# * oberyno <oberyno@gmail.com>
-# * Mamoru Komachi <usata@usata.org>
-#
-# ------------------------------------------------------------------------------
-#<app-portage/genlop-0.30.8>
-
-
-_genlop () {
-local prev1="$words[CURRENT-1]" prev2="$words[CURRENT-2]" days months arg single state lstate
-days=(monday tuesday wednesday thursday friday saturday sunday)
-months=(january february march april may june july august september october november december)
-arg=( --current -c --time -t --gmt -g --info -i --file -f --rsync -r --unmerge -u --date --search -s --list -l )
-single=( --current -c --pretend -p --help -h --version -v )
-
- [[ ${prev2} == (1st|2nd|3rd|4th|5th) ]] &&
- compadd in\ $months && return 0
- [[ ${prev1} == ([2-9]|[1-9][0-9]*) && ${prev2} != \
- (january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
- _values '' 'days ago' 'months ago' 'years ago' 'weeks ago' && return 0
- [[ ${prev1} == (1) && ${prev2} != \
- (january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
- _values '' 'day ago' 'month ago' 'year ago' 'week ago' && return 0
-
- case "$prev1" in
- last)
- _values '' month week
- compadd $days && return 0
- ;;
- 1st|2nd|3rd|4th|5th)
- compadd $days && return 0
- ;;
- january|february|march|april|may|june|july|august|september|october|november|december)
- compadd {1..31} && return 0
- ;;
- --date)
- _message 'enter number for more options or use mm/dd/yyyy format'
- _values '' \
- last yesterday 1st 2nd 3rd 4th 5th
- _alternative \
- '*:*:_genlop_days' '*:*:_genlop_months' && return 0
- ;;
- --file|-f)
- _arguments '*:logfile:_files' && return 0
- ;;
- *)
- _arguments \
- "($single $arg *)"{--current,-c}"[display the current merge in action]" \
- "($single)*--date[specify date of event]:date:->date" \
- "($single)*-f[specify the logfile to use]:logfile:_files" \
- "($single --gmt -g)"{--gmt,-g}"[display time in GMT/UTC format (default is local time)]" \
- "($single $arg *)"{--help,-h}"[display help information]" \
- "($single --info -i --list -l)"{--info,-i}"[print brief summary about installed ebuild]" \
- "($single --search -s --info -i --list -l *)"{--list,-l}"[list merge history]" \
- "(--nocolor -n)"{--nocolor,-n}"[disable colored output]" \
- "($single $arg *)"{--pretend,-p}"[estimate build time of a piped emerge -p]" \
- "($single --search -s --info -i --time -t --unmerge -u --rsync -r *)"{--rsync,-r}"[display rsync history]" \
- "($single --rsync -r --search -s --list -l *)"{--search,-s}"[select ebuilds matching the provided regular expression]:pattern:" \
- "($single --time -t)"{--time,-t}"[display merge time]" \
- "($single --rsync -r --unmerge -u)"{--unmerge,-u}"[display when packages have been unmerged]" \
- "($single $arg *)"{--version,-v}"[display version information]" \
- "($single)*:package:_gentoo_packages available"
- ;;
- esac
-
- while [[ -n "$state" ]]; do
- lstate=$state
- state=''
- case "$lstate" in
- date) _message 'enter number for more options or use mm/dd/yyyy format'
- _values '' \
- last yesterday 1st 2nd 3rd 4th 5th
- _alternative \
- ':*:_genlop_days' ':*:_genlop_months' && return 0
- ;;
- esac
- done
-}
-
-_genlop_days() {
- local m="monday" t="tuesday" w="wednesday" T="thursday" f="friday" s="saturday" S="sunday"
- local day=$(date +%u)
- if [[ ${day} == 1 ]] then compadd $m
- elif [[ ${day} == 2 ]] then compadd $m $t
- elif [[ ${day} == 3 ]] then compadd $m $t $w
- elif [[ ${day} == 4 ]] then compadd $m $t $w $T
- elif [[ ${day} == 5 ]] then compadd $m $t $w $T $f
- elif [[ ${day} == 6 ]] then compadd $m $t $w $T $f $s
- elif [[ ${day} == 7 ]] then compadd $m $t $w $T $f $s $S
- fi
-}
-_genlop_months() {
- local j="january" f="february" m="march" a="april" M="may" ju="june" J="july" A="august" s="september" o="october" n="november" d="december"
- local month=$(date +%m)
- if [[ ${month} == 01 ]] then compadd $j
- elif [[ ${month} == 02 ]] then compadd $j $f
- elif [[ ${month} == 03 ]] then compadd $j $f $m
- elif [[ ${month} == 04 ]] then compadd $j $f $m $a
- elif [[ ${month} == 05 ]] then compadd $j $f $m $a $M
- elif [[ ${month} == 06 ]] then compadd $j $f $m $a $M $ju
- elif [[ ${month} == 07 ]] then compadd $j $f $m $a $M $ju $J
- elif [[ ${month} == 08 ]] then compadd $j $f $m $a $M $ju $J $A
- elif [[ ${month} == 09 ]] then compadd $j $f $m $a $M $ju $J $A $s
- elif [[ ${month} == 10 ]] then compadd $j $f $m $a $M $ju $J $A $s $o
- elif [[ ${month} == 11 ]] then compadd $j $f $m $a $M $ju $J $A $s $o $n
- elif [[ ${month} == 12 ]] then compadd $j $f $m $a $M $ju $J $A $s $o $n $d
- fi
-}
-
-# Local Variables:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_gentoo_packages b/src/_gentoo_packages
deleted file mode 100644
index 5d63c36..0000000
--- a/src/_gentoo_packages
+++ /dev/null
@@ -1,245 +0,0 @@
-#autoload
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# functions for gentoo packages
-# inspired by _deb_packages
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Vadim A. Misbakh-Soloviov <mva@mva.name>
-# * Bapt <bapt@tuxfamily.org>
-# * kaworu <kaworu@kaworu.ch>
-# * David Durrleman <dualmoo@gmail.com>
-# * oberyno <oberyno@gmail.com>
-# * Mamoru Komachi <usata@usata.org>
-#
-# ------------------------------------------------------------------------------
-#Usage: _gentoo_packages installed|available|installed_versions|available_versions|binary|category|useflag|overlays|sets|licenses
-
-# List installed overlays
-_gentoo_packages_overlays () {
- for f in /etc/portage/make.conf /etc/make.conf /usr/share/portage/config/make.globals; do
- [[ -z "$PORTDIR_OVERLAY" && -r "$f" ]] &&
- local PORTDIR_OVERLAY="`. "$f" 2>/dev/null; echo ${PORTDIR_OVERLAY}`"
- done
- compadd $=PORTDIR_OVERLAY
-}
-
-#List the sets
-_gentoo_packages_sets() {
- local sets
- [[ -f /usr/share/portage/config/sets.conf ]] && sets=(${${${(M)${(f)"$(</usr/share/portage/config/sets.conf)"}##\[*}/\[/@}/\]})
- [[ -f /etc/portage/sets.conf ]] && sets=($sets ${${${(M)${(f)"$(</etc/portage/sets.conf)"}##\[*}/\[/@}/\]})
- compadd $sets
-}
-
-#List licenses
-_gentoo_packages_licenses () {
- local licenses var PORTDIR
- var=PORTDIR
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
- local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
- licenses=($PORTDIR/licenses/*(:t))
- compadd $licenses
-}
-
-# Completion function to show useflags.
-_gentoo_packages_useflag(){
- local flags var PORTDIR
- var=PORTDIR
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
- local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
-
- flags=( ${${(M)${(f)"$(<$PORTDIR/profiles/use.desc)"}:#* - *}%% - *}
- ${${${(M)${(f)"$(<$PORTDIR/profiles/use.local.desc)"}#* - *}%% - *}#*:} )
- compadd $flags
-}
-
-_gentoo_packages_active_useflag(){
- local flags var USE
- var=USE
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- flags=(${${${=USE}%-*}%\\*})
- compadd $flags
-}
-_gentoo_packages_category(){
- local var trees category
- for var in PORTDIR PORTDIR_OVERLAY ; do
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
- local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
- done
- trees=($PORTDIR $=PORTDIR_OVERLAY)
- category=( $trees/*-*(/:t) )
- _wanted cat_packages expl 'category' compadd "$@" $category
-}
-
-_gentoo_packages_installed(){
- local installed_dir installed_portage installed_list expl
- installed_dir="/var/db/pkg"
- installed_portage=($installed_dir/*-*/*)
-
- installed_pkgname=( ${${installed_portage:t}%%-[0-9]*} )
- _wanted packages expl 'category/package' compadd "$@" ${installed_pkgname}
-
- installed_list=( ${${installed_portage#$installed_dir/}%%-[0-9]*} )
- _wanted cat_packages expl 'category/package' _multi_parts "$@" / installed_list
-
-}
-
-_gentoo_packages_installed_versions(){
- local installed_list installed_portage expl
-
- installed_portage=(/var/db/pkg/*-*/*)
- _wanted packages expl 'package' compadd "$@" ${installed_portage:t}
-
- installed_list=( ${installed_portage##*/pkg/} )
- _wanted cat_packages expl 'category/package' _multi_parts "$@" / installed_list
-}
-
-_gentoo_packages_available_pkgnames_only(){
- local var trees packages
-
- for var in PORTDIR PORTDIR_OVERLAY ; do
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
- local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
- done
- trees=( $PORTDIR $=PORTDIR_OVERLAY)
-
- packages=( $trees/*-*/*(:t) )
- _wanted packages expl 'package' compadd - "${(@)packages}"
-}
-
-_gentoo_packages_available(){
- local var trees category packages pkg expl
-
- for var in PORTDIR PORTDIR_OVERLAY ; do
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
- local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
- done
- trees=( $PORTDIR $=PORTDIR_OVERLAY)
- category=( $trees/*-*(/:t) )
-
- packages=( $trees/*-*/*(:t) )
- _wanted packages expl 'package' compadd - "${(@)packages}"
-
- # Complete cat/pkg. _multi_parts is much to slow for such a large task,
- # _sep_parts removes the dash from gnome-<tab>, and _path_files wants to
- # complete cat/pkg/files (if "files" is ignored with -F, miscfiles, etc...
- # don't get completed).
- if [[ $PREFIX != */* ]] ; then
- _wanted cat_packages expl 'category/package' compadd -S '/' $category
- else
- compset -P '*/'
- pkg=( $trees/$IPREFIX/*(:t) )
- _wanted cat_packages expl 'category/package' compadd $pkg
- fi
-}
-
-_gentoo_packages_available_versions(){
- local var overlay_ebuilds portage_ebuilds expl trees category
-
- for var in PORTDIR PORTDIR_OVERLAY ; do
- [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
- local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.conf ]] &&
- local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
- local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
- done
- trees=($PORTDIR $=PORTDIR_OVERLAY)
- category=( $trees/*-*(/:t) )
- typeset -U category
-
- if [[ $#PREFIX -ge 1 && -z $words[(r)(--inject|-i)] ]] ; then
- overlay_ebuilds=($=PORTDIR_OVERLAY/*-*/${PREFIX%%-[0-9]#*}*/*.ebuild(:t:r) )
- portage_ebuilds=($PORTDIR/metadata/cache/*-*/${PREFIX%%-[0-9]#*}*(:t))
- _wanted packages expl 'package' compadd $portage_ebuilds $overlay_ebuilds
- fi
- pkg=( $trees/${PREFIX%%/*}/*/*.ebuild(:t:r) )
- _wanted cat_packages expl 'category/package' _sep_parts category / pkg
-}
-
-#Function to show tbz2 files available
-_gentoo_packages_binary() {
- [[ -z $PKGDIR && -r /etc/portage/make.conf ]] &&
- local PKGDIR="`. /etc/portage/make.conf 2>/dev/null; echo $PKGDIR`"
- [[ -z $PKGDIR && -r /etc/make.conf ]] &&
- local PKGDIR="`. /etc/make.conf 2>/dev/null; echo $PKGDIR`"
- [[ -z $PKGDIR && -r /usr/share/portage/config/make.globals ]] &&
- local PKGDIR="`. /usr/share/portage/config/make.globals 2>/dev/null; echo $PKGDIR`"
-
- # this doesn't take care of ${PORTAGE_BINHOST}. If Gentoo official
- # binary mirror will be available we should rewrite it accordingly.
- _path_files -g \*.tbz2 -W "$PKGDIR/All"
-}
-
-_gentoo_packages () {
- local command="$argv[$#]"
- [[ "$command" == (sets|licenses|installed(_versions|)|available(_versions|)|binary|category|(active_|)useflag|available_pkgnames_only|overlays) ]] || {
- _message "unknown command: $command"
- return 1
- }
- _gentoo_packages_$command
-}
-
-_gentoo_packages "$@"
-
-# Local Variables:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_gentoolkit b/src/_gentoolkit
deleted file mode 100644
index 835f5ec..0000000
--- a/src/_gentoolkit
+++ /dev/null
@@ -1,410 +0,0 @@
-#compdef equery euse eclean eclean-dist eclean-pkg epkginfo genpkgindex glsa-check revdep-rebuild
-# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the zsh-users nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ------------------------------------------------------------------------------
-# Description
-# -----------
-#
-# Completion script for Gentoolkit (collection of Gentoo administrative scripts).
-# (Means portage helper python-scrips and some usefull staff)
-#
-# ------------------------------------------------------------------------------
-# Authors
-# -------
-#
-# * Vadim A. Misbakh-Soloviov <mva@mva.name>
-# * Bapt <bapt@tuxfamily.org>
-# * kaworu <kaworu@kaworu.ch>
-# * David Durrleman <dualmoo@gmail.com>
-# * oberyno <oberyno@gmail.com>
-# * Mamoru Komachi <usata@usata.org>
-#
-# ------------------------------------------------------------------------------
-#<app-portage/gentoolkit-0.2.4-rc3>
-#
-# Status:
-# euse (fully done)
-# equery (fully done)
-# eclean* (fully done)
-# epkginfo (fully done)
-# genpkgindex (fully done)
-# glsa-check (fully done)
-# revdep-rebuild (fully done)
-# eread (nothing todo)
-
-
-# XXX: shouldn't this go to _gentoo_package?
-_packages () {
- if compset -P '(\\|)(>=|<=|<|>|=)' ; then
- _gentoo_packages ${*/(#m)(installed|available)/${MATCH}_versions}
- else
- _gentoo_packages $*
- fi
-}
-
-
-_euse () {
- local state tmp start_args suboptions_args
- start_args=(
- {'(--help)-h','(-h)--help'}'[show help]'
- {'(--version)-v','(-v)--version'}'[show version]'
- {'(--info)-i','(-i)--info'}'[show descriptions for the given useflags]'
- {'(--active)-a','(-a)--active'}'[show currently active useflags and their origin]'
- {'(--enable)-E','(-E)--enable'}'[enable the given useflags]'
- {'(--disable)-D','(-D)--disable'}'[disable the given useflags]'
- {'(--prune)-P','(-P)--prune'}'[show version]'
- )
- suboptions_args=(
- {'(--global)-g','(-g)--global'}'[show only global use flags]'
- {'(--local)-l','(-l)--local'}'[show only local use flags]'
- )
- if (( CURRENT == 2 ));then
- _arguments -s $start_args
- elif (( CURRENT == 3 ));then
- case "$words[2]" in
- -i|--info|-a|--active)
- _arguments -s $suboptions_args \
- '*:useflags:_gentoo_packages useflag' && ret=0
- ;;
- -E|--enable)
- _arguments \
- '*:useflags:_gentoo_packages useflag' && ret=0
- ;;
- -D|--disable)
- _arguments \
- '*:active useflags:_gentoo_packages active_useflag' && ret=0
- esac
- else
- _arguments \
- '*:useflag:_gentoo_packages useflag' && ret=0
- fi
-}
-
-
-_equery () {
- # Based off of X/_xauth.
- local state context line expl ret=1
- local tmp cmd start_args common_args
-
- start_args=(
- {'(--nocolor)-C','(-C)--nocolor'}'[turns off colors]'
- {'(--quiet)-q','(-q)--quiet'}'[minimal output]'
- {'(--help)-h','(-h)--help'}'[show help]'
- {'(--version)-V','(-V)--version'}'[show version]'
- )
-
- common_args=(
- '(-i --installed -I --exclude-installed)'{-i,--installed}'[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]'
- '(-o --overlay-tree)'{-o,--overlay-tree}'[also search in overlay tree]'
- )
-
-
- _arguments -s $start_args \
- '*::command:->command' && ret=0
-
- while [[ -n "$state" ]]; do
- tmp="$state"
- state=
- case "$tmp" in
- command)
- if (( CURRENT == 1 )); then
- state=subcommands
- else
- cmd="$words[1]"
- curcontext="${curcontext%:*:*}:equery-${cmd}:"
- case "$cmd" in
- belongs|b)
- _arguments \
- '(-c --category)'{-c,--category}'[only search in specified category]:category:_gentoo_packages category' \
- '(-e --earlyout)'{-e,--earlyout}'[stop when first match found]' \
- '(-f --full-regex)'{-f,--full-regex}'[supplied query is a full regex]:pattern:' \
- '*:file:_files' && ret=0
- ;;
- check|k)
- _arguments \
- ':portage:_packages installed' && ret=0
- ;;
- depends|d)
- _arguments \
- '(-a --all-packages)'{-a,--all-packages}'[search in all available packages (slow)]:all packages:->packages' \
- '(-d --direct -D --indirect)'{-d,--direct}'[search direct dependencies only (default)]' \
- '(-d --direct -D --indirect)'{-D,--indirect}'[search indirect dependencies (VERY slow)]' \
- '*:package:_packages installed' && ret=0
- ;;
- depgraph|g)
- _arguments \
- '(-U --no-useflags)'{-U,--no-useflags}'[do not show USE flags]' \
- '(-l --linear)'{-l,--linear}'[do not use fancy formatting]' \
- ':package:_packages installed' && ret=0
- ;;
- files|f)
- _arguments \
- '--timestamp[append timestamp]' \
- '--md5sum[append md5sum]' \
- '--type[prepend file type]' \
- '--filter=[filter output]:filter(s):_values -s , '' dir obj sym dev fifo path conf cmd doc man info' \
- ':installed pkgname:_packages installed' && ret=0
- ;;
- hasuse|h)
- _arguments \
- $common_args \
- ':useflag:_gentoo_packages useflag' && ret=0
- ;;
- list|l)
- _arguments \
- $common_args \
- ': :_guard "^--*" pattern' && ret=0
- ;;
- size|s)
- _arguments \
- '(-b --bytes)'{-b,--bytes}'[report size in bytes]' \
- ':package:_packages installed' && ret=0
- ;;
- which|w)
- _arguments \
- ':portage:_packages available' && ret=0
- ;;
- uses|u)
- _arguments \
- {--all,-a}'[include non-installed packages]' \
- ":portage:_packages installed" && ret=0
- ;;
- *)
- _message 'command not found'
- ;;
- esac
- fi
- ;;
- subcommands)
- tmp=(
- {belongs,b}'[list all packages owning file(s)]'
- {check,k}'[check MD5sums and timestamps of package]'
- {depends,d}'[list all packages depending on specified package]'
- {depgraph,g}'[display a dependency tree for package]'
- {files,f}'[list files owned by package]'
- {hasuse,h}'[list all packages with specified useflag]'
- {list,l}'[list all packages matching pattern]'
- {size,s}'[print size of files contained in package]'
- {uses,u}'[display USE flags for package]'
- {which,w}'[print full path to ebuild for package]'
- )
- _values 'equery command' $tmp && ret=0
- ;;
- esac
- done
-}
-
-
-_eclean_wrapper () {
- local global_opts pkg_opts dist_opts
-
- global_opts=(
- '(-C --nocolor)'{-C,--nocolor}'[turns off colors]'
- '(-d,--destructive)'{-d,--destructive}'[only keep the minimum for a reinstallation]'
- '(-e,--exclude-file)'{-e,--exclude-file}'[path to the exclusion file]:filename:_files'
- '(-i,--interactive)'{-i,--interactive}'[ask confirmation before deletions]'
- '(-n,--package-names)'{-n,--package-names}'[protect all versions (when --destructive)]'
- '(-p,--pretend)'{-p,--pretend}'[only display what would be cleaned]'
- '(-q,--quiet)'{-q,--quiet}'[minimal output]'
- '(-t,--time-limit)'{-t,--time-limit}'[don’t delete files modified since <time>]:time:_eclean_time'
- '(: -)'{-h,--help}'[show help]'
- '(: -)'{-V,--version}'[show version]'
- )
- dist_opts=(
- '(-s,--size-limit)'{-s,--size-limit}'[do not delete disfiles bigger than <size>]:size:_eclean_size'
- '(-f,--fetch-restricted)'{-f,--fetch-restricted}'[protect fetch-restricted files]'
- )
- # XXX: If you add options here make sure that it'll work.
- # since there isn't any option *right* now, $pkg_opts
- # is never used.
- pkg_opts=()
-
- # check which kind of eclean command we run.
- case "$words[1]" in
- eclean-pkg)
- _arguments -s $global_opts $pkg_opts &&
- return 0
- ;;
- eclean-dist)
- _arguments -s $global_opts $dist_opts &&
- return 0
- ;;
- eclean)
- # eclean. complete only specifics options if an action has been given,
- # global_opts and packages|distfiles otherwhise.
- if (( $words[(I)(packages)] )); then
- # Currently no options so return 0
- #_values "packages options" $pkg_opts &&
- return 0
- elif (( $words[(I)(distfiles)] )); then
- _values "distfiles options" $dist_opts &&
- return 0
- else
- _arguments -s $global_opts
- # complete packages|distfiles only if CURRENT-1 don't need an arg
- if [[ ! $words[CURRENT-1] =~ -(e|-exclude-file|t|-time-limit|s|-size-limit|h|-help|v|-version) ]]; then
- _values 'eclean command' \
- 'packages[clean outdated binary packages]' \
- 'distfiles[clean outdated packages sources files]' &&
- return 0
- fi
- fi
- ;;
- esac
-}
-_eclean_time () {
- # adapted from _chmod
- compset -P '*'
- suf=( -S '' )
- _alternative -O suf \
- 'number:number:(0 1 2 3 4 5 6 7 8 9)' \
- 'time_unit:time_unit:((y\:year m\:month w\:week d\:day h\:hour))' &&
- return 0
-}
-_eclean_size () {
- # adapted from _chmod
- compset -P '*'
- suf=( -S '' )
- _alternative -O suf \
- 'number:number:(0 1 2 3 4 5 6 7 8 9)' \
- 'time_unit:time_unit:((G\:gigabytes M\:megabytes K\:kilobytes B\:bytes))' &&
- return 0
-}
-
-
-_epkginfo () {
- if (( CURRENT == 2 )); then
- _arguments -s '*:package:_gentoo_packages available'
- fi
-}
-
-
-_genpkgindex () {
- _arguments -s \
- '(: -)'{-h,--help}'[Display help and exit]' \
- '(-h --help -q --quiet -v --verbose)'{-q,--quiet}'[Be quiet]' \
- '(-h --help -q --quiet -v --verbose)'{-v,--verbose}'[Be verbose]' \
- '(-h --help -c --compress)'{-c,--compress}'[Compresses the generated metadata with bzip2]' \
- '(-h --help -P --pkgdir)'{-P,--pkgdir}'[Set the base location of the binary packages (default $PKGDIR)]:file:_files'
-}
-
-
-_glsa-check () {
- local actions
-
- actions=(-l --list -d --dump --print -t --test -p --pretend -f --fix -i --inject -h --help -V --version -m --mail)
-
- _arguments -s \
- "($actions)"{-l,--list}'[list all unapplied GLSA]:glsa_id:_glsa_id' \
- "($actions)"{-d,--dump,--print}'[show all information about the given GLSA]:glsa_id:_glsa_id' \
- "($actions)"{-t,--test}'[test if this system is affected by the given GLSA]:glsa_id:_glsa_id' \
- "($actions)"{-p,--pretend}'[show the necessary commands to apply this GLSA]:glsa_id:_glsa_id' \
- "($actions)"{-f,--fix}'[try to auto-apply this GLSA (experimental)]:glsa_id:_glsa_id' \
- "($actions)"{-i,--inject}'[inject the given GLSA into the checkfile]:glsa_id:_glsa_id' \
- '(-n --nocolor)'{-n,--nocolor}'[disable colors (option)]' \
- '(: -)'{-h,--help}'[Show help message]' \
- '(: -)'{-V,--version}'[some information about this tool]' \
- '(-v --verbose)'{-v,--verbose}'[print more messages (option)]' \
- '(-c --cve)'{-c,--cve}'[show CAN ids in listing mode (option)]' \
- "($actions)"{-m,--mail}'[send a mail with the given GLSAs to the administrator]:glsa_id:_glsa_id'
-}
-# glsa-list can contain an arbitrary number of GLSA ids,
-# filenames containing GLSAs or the special identifiers
-# 'all', 'new' and 'affected'
-_glsa_id () {
-# XXX: we'll avoid displaying GLSA ids, because the ratio use/noise
-# will be low. May be we should display only the X previous GLSA,
-# or GLSA ids of the X last month.
-#
-# start to look at /usr/lib/gentoolkit/pym/glsa.py if GLSA_DIR is still
-# PORTDIR + "metadata/glsa/"
-# and then get the list (it's only xml files in GLSA_DIR, easy!)
-
- compadd 'all' 'new' 'affected'
- _files
-}
-
-
-_revdep-rebuild () {
- if (( $words[(I)(--)] )); then
- # here it's no more revdep-rebuild options, but emerge options that are called
- _arguments -s '*:portage:_portage --emerge $@' && return 0
- fi
-
- _arguments -s \
- '(-C --nocolor)'{-C,--nocolor}'[Turn off colored output]' \
- '(-d --debug)'{-d,--debug}'[Print way too much information (uses bash set -xv)]' \
- '(-e --exact)'{-e,--exact}'[Emerge based on exact package version]' \
- '(: -)'{-h,--help}'[Print help]' \
- '(-i --ignore)'{-i,--ignore}'[Ignore temporary files from previous runs]' \
- '(-k --keep-temp)'{-k,--keep-temp}'[Do not delete temporary files on exit]' \
- '(-L --library)'{-L,--library}'[<NAME> Emerge existing packages that use the library with NAME]:file:_files' \
- '(-l --no-ld-path)'{-l,--no-ld-path}'[Do not set LD_LIBRARY_PATH]' \
- '(-o --no-order)'{-o,--no-order}'[Do not check the build order (Saves time, but may cause breakage)]' \
- '(-p --pretend)'{-p,--pretend}'[Do a trial run without actually emerging anything (also passed to emerge command)]' \
- '(-P --no-progress)'{-P,--no-progress}'[Turn off the progress meter]' \
- '(-q --quiet)'{-q,--quiet}'[Be less verbose (also passed to emerge command)]' \
- '(-v --verbose)'{-v,--verbose}'[Be more verbose (also passed to emerge command)]' \
- '(-u --no-util)'{-u,--no-util}'[<UTIL> Do not use features provided by UTIL]:file:_files'
- # XXX: does someone really use -u|--no-util option?
- # we can check packages installed (like portage-utils etc) to see
- # which "UTIL" is avaiable.
-}
-
-
-case "$service" in
- euse)
- _euse "$@" && return 0
- ;;
- equery)
- _equery "$@" && return 0
- ;;
- eclean*)
- _eclean_wrapper "$@" && return 0
- ;;
- epkginfo)
- _epkginfo "$@" && return 0
- ;;
- genpkgindex)
- _genpkgindex "$@" && return 0
- ;;
- glsa-check)
- _glsa-check "$@" && return 0
- ;;
- revdep-rebuild)
- _revdep-rebuild "$@" && return 0
- ;;
-esac
-
-# Local Variables:
-# mode: Shell-Script
-# sh-indentation: 2
-# indent-tabs-mode: nil
-# sh-basic-offset: 2
-# End:
-# vim: ft=zsh sw=2 ts=2 et
diff --git a/src/_layman b/src/_layman
deleted file mode 100644