diff options
author | 2007-01-18 10:07:19 +0000 | |
---|---|---|
committer | 2007-01-18 10:07:19 +0000 | |
commit | 86a03c24379fd0c09f973acc970af126cf127e1a (patch) | |
tree | 8ee450fac5c2160c4e84715f898f1fc562a6d850 /zsh-completion | |
parent | 199d8e00b454fdf85860e69333f38f652861cf79 (diff) | |
download | paludis-86a03c24379fd0c09f973acc970af126cf127e1a.tar.gz paludis-86a03c24379fd0c09f973acc970af126cf127e1a.tar.xz |
Update zsh completion. From: Baptiste Daroussin. Fixes: ticket:26
Diffstat (limited to 'zsh-completion')
-rw-r--r-- | zsh-completion/_paludis | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/zsh-completion/_paludis b/zsh-completion/_paludis index 1f069d850..383c02e83 100644 --- a/zsh-completion/_paludis +++ b/zsh-completion/_paludis @@ -10,42 +10,46 @@ _paludis() { --has-version --best-version --environnement-variable --list-repositories --list-categories --list-packages --list-sets --list-sync-protocols --list-repository-formats --list-dep-tag-categories --regenerate-installed-cache --update-news --regenerate-installable-cache) query_args=( - '(--show-deps -D)'{--show-deps,-D}"[Show dependencies]" - '(--show-metadata -M)'{--show-metadata,-M}"[Show raw metadata]" + "(--show-deps -D)"{--show-deps,-D}"[Show dependencies]" + "(--show-metadata -M)"{--show-metadata,-M}"[Show raw metadata]" ) install_uninstall_args=( - '(--pretend -p)'{--pretend,-p}"[Pretend only]" - '(--preserve-world -1)'{--preserve-world,-1}"[Don t modify the world file]" - '--no-config-protection[Disable config file protection (dangerous)]' - '--debug-build[What to do with debug information]:Debug Build:(( none\:Discard\ debug\ information split\:Split\ debug\ information internal\:Keep\ debug\ information\ with\ binaries ))' - '(--fetch -f)'{--fetch,-f}'[Only fetch sources; don t install anything]' - '--show-reasons[Show why packages are being (un)installed]:Verbosity:((none\:Don\ t\ show\ any\ information summary\:Show\ a\ summary full\:Show\ full\ output))' - '--with-unused-dependencies[Also uninstall any dependencies of the target that are no longer used]' - '--with-dependencies[Also uninstall packages that depend upon the target]' - '--show-use-descriptions[Show descriptions of USE flags]:case to show:((none\:Don\ t\ show\ any\ descriptions new\:Show\ for\ new\ use\ flags changed\:Show\ for\ new\ and\ changed\ flags all\:Show for all flags))' - '--add-to-world-atom[Use this atom, rather than all targets, for updating world (for resume commands)]' + "(--pretend -p)"{--pretend,-p}"[Pretend only]" + "(--preserve-world -1)"{--preserve-world,-1}"[Don t modify the world file]" + "--no-config-protection[Disable config file protection (dangerous)]" + "--debug-build[What to do with debug information]:Debug Build:(( none\:Discard\ debug\ information split\:Split\ debug\ information internal\:Keep\ debug\ information\ with\ binaries ))" + "(--fetch -f)"{--fetch,-f}"[Only fetch sources; don t install anything]" + "--show-reasons[Show why packages are being (un)installed]:Verbosity:((none\:Don\ t\ show\ any\ information summary\:Show\ a\ summary full\:Show\ full\ output))" + "--show-use-descriptions[Show descriptions of USE flags]:case to show:((none\:Don\ t\ show\ any\ descriptions new\:Show\ for\ new\ use\ flags changed\:Show\ for\ new\ and\ changed\ flags all\:Show for all flags))" + "--add-to-world-atom[Use this atom, rather than all targets, for updating world (for resume commands)]" + "--safe-resume[Allow interrupted downloads to be resumed safely]" ) list_args=( - '--repository[Matches with this repository name only]:repository:_paludis_packages repositories' - '--category[Matches with this category name only]:category:_paludis_packages category' - '--package[Matches with this package name only]:package:_paludis_packages available' - '--set[Matches with this package set name only]:set:_paluldis_packages set' + "--repository[Matches with this repository name only]:repository:_paludis_packages repositories" + "--category[Matches with this category name only]:category:_paludis_packages categories" + "--package[Matches with this package name only]:package:_paludis_packages available" + "--set[Matches with this package set name only]:set:_paludis_packages sets" + ) + uninstall_args=( + "--with-unused-dependencies[Also uninstall any dependencies of the target that are no longer used]" + "--with-dependencies[Also uninstall packages that depend upon the target]" + "--all-versions[Uninstall all versions of a package]" ) - lists=( - '(: -)--list-repositories[List available repositories]' - '(: -)--list-categories[List available categories]' - '(: -)--list-packages[List available packages]' - '(: -)--list-sets[List available package sets]' - '(: -)--list-sync-protocols[List available sync protocols]' - '(: -)--list-repository-formats[List available repository formats]' - '(: -)--list-dep-tag-categories[List known dep tag categories]' + "(: -)--list-repositories[List available repositories]" + "(: -)--list-categories[List available categories]" + "(: -)--list-packages[List available packages]" + "(: -)--list-sets[List available package sets]" + "(: -)--list-sync-protocols[List available sync protocols]" + "(: -)--list-repository-formats[List available repository formats]" + "(: -)--list-dep-tag-categories[List known dep tag categories]" ) general_args=( - '--log-level[Specify the log level]:log level:((debug\:Show\ debug\ output qa\:Show\ QA\ messages\ and\ warnings\ only warning\:Show\ warnings\ only silent\:Suppress\ all\ log\ messages))' - '(--no-colour --no-color)'{--no-colour,--no-color}"[Do not use colour]" - '(--config-suffix -c)'{-c,--config-suffix}"[Config directory suffix]" + "--log-level[Specify the log level]:log level:((debug\:Show\ debug\ output qa\:Show\ QA\ messages\ and\ warnings\ only warning\:Show\ warnings\ only silent\:Suppress\ all\ log\ messages))" + "(--no-colour --no-color)"{--no-colour,--no-color}"[Do not use colour]" + "(--config-suffix -c)"{-c,--config-suffix}"[Config directory suffix]" + "--resume-command-template[Save the resume command to a file made using mkstemp(3)]:file:_files" ) action_args=( @@ -81,36 +85,34 @@ _paludis() { "--dl-installed-deps-post[How to handle post dependencies for installed packages]:How:(pre pre-or-post post try-post discard)" "--dl-uninstalled-deps-pre[How to handle pre dependencies for uninstalled packages]:How:(pre pre-or-post post try-post discard)" "--dl-uninstalled-deps-post[How to handle post dependencies for uninstalled packages]:How:(pre pre-or-post post try-post discard)" + "--dl-uninstalled-deps-runtime[How to handle runtime dependencies for uninstalled packages]:How:(pre pre-or-post post try-post discard)" "--dl-circular[How to handle circular dependencies]:How:(error discard)" "--dl-fall-back[When to fall back to installed packages]:When:(as-needed-except-targets as-needed never)" "--dl-new-slots[When to pull in new slots (works with --dl-upgrade)]:When:(always as-needed)" ) #dispatch - if (( $words[(I)(--(uninstall)|-[[:alpha:]]#(u)[[:alpha:]]#)] )) ; then + if (( $words[(I)(--uninstall|-[[:alpha:]]#u[[:alpha:]]#)] )) ; then _arguments -s \ - $general_args[@] $deplist_args[@] $install_uninstall_args[@] \ + $general_args[@] $deplist_args[@] $install_uninstall_args[@] $uninstall_args[@] \ "*:installed package:_paludis_packages installed" && return 0 elif (( $words[(I)--uninstall-unused] )) ; then _arguments -s \ $deplist_args[@] $install_uninstall_args[@] && return 0 - elif (( $words[(I)(--(owner)|-[[:alpha:]]#(o)[[:alpha:]]#)] )) ;then + elif (( $words[(I)(--owner|-[[:alpha:]]#o[[:alpha:]]#)] )) ;then _arguments -s \ $general_args[@] $owner_args[@]\ "*:Files:_files" && return 0 - elif (( $words[(I)(--(install)|-[[:alpha:]]#(i)[[:alpha:]]#)] )) ;then + elif (( $words[(I)(--install|-[[:alpha:]]#i[[:alpha:]]#)] )) ;then _arguments -s \ $general_args[@] $deplist_args[@] $install_uninstall_args[@] \ "*:available packages:_paludis_packages available" && return 0 - elif (( $words[(I)(--(query)|-[[:alpha:]]#(q)[[:alpha:]]#)] )) ;then + elif (( $words[(I)(--query|-[[:alpha:]]#q[[:alpha:]]#)] )) ;then _arguments -s \ $general_args[@] $query_args[@]\ "*:available packages:_paludis_packages available" && return 0 - elif (( $words[(I)--(repository|package|category|set)] ));then - _arguments \ - $lists[@] && return 0 else _arguments -s \ - $general_args[@] $deplist_args[@] $list_args[@] $lists[@] $install_uninstall_args[@] "$action_args[@]" && return 0 + $general_args[@] $deplist_args[@] $list_args[@] $lists[@] $install_uninstall_args[@] $uninstall_args[@] $owner_args[@] $query_args[@] "$action_args[@]" && return 0 fi } |