aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-30 08:46:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-30 08:46:21 +0000
commit9d1c6af800448fb0eb366513e99c1b24825111ad (patch)
treeb9628cb0c5ce0c57db7c583d7bd71a1effedb889
parentf06051f3a53253474298ddb0a5a2bd610ec605fb (diff)
downloadpaludis-9d1c6af800448fb0eb366513e99c1b24825111ad.tar.gz
paludis-9d1c6af800448fb0eb366513e99c1b24825111ad.tar.xz
Update zsh completion. From Baptiste Daroussin. Fixes: ticket:63
-rw-r--r--zsh-completion/_adjutrix4
-rw-r--r--zsh-completion/_paludis7
-rw-r--r--zsh-completion/_paludis_packages12
3 files changed, 18 insertions, 5 deletions
diff --git a/zsh-completion/_adjutrix b/zsh-completion/_adjutrix
index 0c9c08c..13afdea 100644
--- a/zsh-completion/_adjutrix
+++ b/zsh-completion/_adjutrix
@@ -7,9 +7,11 @@
_adjutrix() {
local actions tree_options profile_options general_options actions_args arches
actions=(
+ --what-needs-keywording -w
--find-stable-candidates -s
--find-dropped-keywords -d
--find-insecure-packages -i
+ --find-unused-packages -U
--keyword-graph -k
--reverse-deps -r
--display-profiles-use -u
@@ -32,6 +34,8 @@ _adjutrix() {
'(--repository-dir -D)'{--repository-dir,-D}'[Where to find the repository]:repository:_files -/'
)
action_args=(
+ "($actions)"{--what-needs-keywording,-w}"[Display what needs to be done to keyword a target]:arch:($arches)"
+ "($actions)"{--find-unused-packages,-U}"[Search package versions that can probably safely be removed]"
"($actions)"{--find-stable-candidates,-s}"[Search for stable package candidates]:arch:($arches)"
"($actions)"{--find-dropped-keywords,-d}"[Search for packages where keywords have been dropped]:arch:($arches)"
"($actions)"{--find-insecure-packages,-i}"[Search for packages marked as insecure by a GLSA]"
diff --git a/zsh-completion/_paludis b/zsh-completion/_paludis
index 383c02e..3bdafec 100644
--- a/zsh-completion/_paludis
+++ b/zsh-completion/_paludis
@@ -26,6 +26,7 @@ _paludis() {
"--safe-resume[Allow interrupted downloads to be resumed safely]"
)
list_args=(
+ "--repository-format[Matches with this repository format only]:format:_paludis_packages repository-formats"
"--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"
@@ -76,6 +77,10 @@ _paludis() {
"--full-match[Match whole filename]"
)
deplist_args=(
+ "--dl-blocks[How to handle blocks]:How:(accumulate error discard)"
+ "--dl-override-masks[Zero or more mask kinds that can be overridden as necessary]:What:(tilde-keyword unkeyworded profile repository license)"
+ "--dl-suggested[How to handle suggested dependencies]:How:(show install discard)"
+ "--dl-downgrade[When to downgrade packages]:When:(as-needed warning error)"
"--dl-reinstall[When to reinstall packages]:When:(never always if-use-changed)"
"--dl-reinstall-scm[When to reinstall scm packages]:When:(never always daily weekly)"
"--dl-upgrade[When to upgrade packages]:When:(always as-needed)"
@@ -112,7 +117,7 @@ _paludis() {
"*:available packages:_paludis_packages available" && return 0
else
_arguments -s \
- $general_args[@] $deplist_args[@] $list_args[@] $lists[@] $install_uninstall_args[@] $uninstall_args[@] $owner_args[@] $query_args[@] "$action_args[@]" && return 0
+ $general_args[@] $deplist_args[@] $list_args[@] $lists[@] $install_uninstall_args[@] $uninstall_args[@] $owner_args[@] $query_args[@] "$action_args[@]" "*:available packages:_paludis_packages available" && return 0
fi
}
diff --git a/zsh-completion/_paludis_packages b/zsh-completion/_paludis_packages
index ba5d7d3..ed7e57a 100644
--- a/zsh-completion/_paludis_packages
+++ b/zsh-completion/_paludis_packages
@@ -3,7 +3,7 @@
# vim: set et sw=4 sts=4 ts=4 ft=zsh :
# ZSH completion utility functions for paludis
# Written by Baptiste Daroussin <baptux at free.fr>
-# Usage: _paludis_packages installed|available|repositories|categories|sets
+# Usage: _paludis_packages installed|available|repositories|categories|sets|repository-formats
local flags prepo packages categories
_paludis_packages_update_available() {
@@ -18,9 +18,13 @@ _paludis_packages_update_available() {
fi
}
+_paludis_packages_update_repository-formats() {
+ packages=(${${(M)${(f)"$(paludis --list-repository-formats)"}:#\* *}##\* })
+ compadd ${(@)packages}
+}
+
_paludis_packages_update_installed() {
packages=(${${(M)${(f)"$(paludis --repository installed --list-packages)"}:#\* *}##\* })
-
compadd ${(@)packages}
}
_paludis_packages_update_categories() {
@@ -41,11 +45,11 @@ _paludis_packages() {
if [[ -z "$update_policy" ]]; then
zstyle ":completion:*:*:$service:*" cache-policy _paludis_cache_policy
fi
- [[ "$command" == (installed|available|categories|repositories|sets) ]] || {
+ [[ "$command" == (installed|available|categories|repositories|sets|repository-formats) ]] || {
_message "unknown command: $command"
return
}
- [[ "$pkgset" == (installed|available|categories|repositories|sets) ]] || {
+ [[ "$pkgset" == (installed|available|categories|repositories|sets|repository-formats) ]] || {
pkgset="$command"
}
expl=("${(@)argv[1,-2]}")