diff options
author | 2014-12-19 18:20:38 -0800 | |
---|---|---|
committer | 2014-12-19 18:32:52 -0800 | |
commit | 52d16f8a397b247a1e2e662827507b7f86d77fc6 (patch) | |
tree | e8bdfe69974ae34a452c947b86f4bf078344d4e4 /src/_gentoolkit | |
parent | _portage: add optional arguments for quickpkg (diff) | |
download | zsh-completion-52d16f8a397b247a1e2e662827507b7f86d77fc6.tar.gz zsh-completion-52d16f8a397b247a1e2e662827507b7f86d77fc6.tar.bz2 zsh-completion-52d16f8a397b247a1e2e662827507b7f86d77fc6.zip |
array formatting, whitespace consistency, and other minor cleanups
Diffstat (limited to 'src/_gentoolkit')
-rw-r--r-- | src/_gentoolkit | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/_gentoolkit b/src/_gentoolkit index 0b0d956..903e4b6 100644 --- a/src/_gentoolkit +++ b/src/_gentoolkit @@ -22,6 +22,7 @@ _packages () { _euse () { local state tmp start_args suboptions_args + start_args=( {'(--help)-h','(-h)--help'}'[show help]' {'(--version)-v','(-v)--version'}'[show version]' @@ -34,10 +35,12 @@ _euse () { {'(--prune)-P','(-P)--prune'}'[alias for --remove]' {'(--package)-p','(-p)--package'}'[used with -E, -D, and -R to apply to a specific package only]' ) + 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 @@ -236,10 +239,12 @@ _eclean_wrapper () { '(: -)'{-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. @@ -258,11 +263,9 @@ _eclean_wrapper () { # 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 + _values "distfiles options" $dist_opts && return 0 else _arguments -s $global_opts # complete packages|distfiles only if CURRENT-1 don't need an arg |