1 |
commit: 3f65f6decf38e844f98839ac5a54d1705afe1338 |
2 |
Author: Tim Harder <radhermit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 27 06:28:28 2014 +0000 |
4 |
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 27 06:38:32 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=3f65f6de |
7 |
|
8 |
_gentoolkit: update various equery command completions (bug #518512) |
9 |
|
10 |
Also sort the commands to put them in alphabetical order that matches |
11 |
the equery output. |
12 |
|
13 |
--- |
14 |
src/_gentoolkit | 84 ++++++++++++++++++++++++++++++++++++--------------------- |
15 |
1 file changed, 53 insertions(+), 31 deletions(-) |
16 |
|
17 |
diff --git a/src/_gentoolkit b/src/_gentoolkit |
18 |
index 6283f1b..25d679d 100644 |
19 |
--- a/src/_gentoolkit |
20 |
+++ b/src/_gentoolkit |
21 |
@@ -76,9 +76,8 @@ _equery () { |
22 |
) |
23 |
|
24 |
common_args=( |
25 |
- '(-i --installed -I --exclude-installed)'{-i,--installed}'[search installed packages]' |
26 |
- '(-I --exclude-installed -i --installed)'{-I,--exclude-installed}'[do not search installed packages]' |
27 |
- '(-p --portage)'{-p,--portage-tree}'[also search in portage tree]' |
28 |
+ '(-I --exclude-installed)'{-I,--exclude-installed}'[do not search installed packages]' |
29 |
+ '(-p --portage-tree)'{-p,--portage-tree}'[also search in portage tree]' |
30 |
'(-o --overlay-tree)'{-o,--overlay-tree}'[also search in overlay tree]' |
31 |
) |
32 |
|
33 |
@@ -99,41 +98,76 @@ _equery () { |
34 |
case "$cmd" in |
35 |
belongs|b) |
36 |
_arguments \ |
37 |
- '(-c --category)'{-c,--category}'[only search in specified category]:category:_gentoo_packages category' \ |
38 |
- '(-e --earlyout)'{-e,--earlyout}'[stop when first match found]' \ |
39 |
- '(-f --full-regex)'{-f,--full-regex}'[supplied query is a full regex]:pattern:' \ |
40 |
+ '(-e --early-out)'{-e,--early-out}'[stop when first match found]' \ |
41 |
+ '(-f --full-regex)'{-f,--full-regex}'[supplied query is a regex]:pattern:' \ |
42 |
+ '(-n --name-only)'{-n,--name-only}"[don't print the version]" \ |
43 |
'*:file:_files' && ret=0 |
44 |
;; |
45 |
+ changes|c) |
46 |
+ _arguments \ |
47 |
+ '(-l --latest)'{-l,--latest}'[only display latest ChangeLog entry]' \ |
48 |
+ '(-f --full)'{-f,--full}'[display full ChangeLog entry]' \ |
49 |
+ '--limit[limit the number of entries displayed (with --full)]:number:' \ |
50 |
+ ':portage:_packages available' && ret=0 |
51 |
+ ;; |
52 |
check|k) |
53 |
_arguments \ |
54 |
+ '(-f --full-regex)'{-f,--full-regex}'[supplied query is a regex]:pattern:' \ |
55 |
+ '(-o --only-failures)'{-o,--only-failures}'[only display packages that do not pass]' \ |
56 |
':portage:_packages installed' && ret=0 |
57 |
;; |
58 |
depends|d) |
59 |
_arguments \ |
60 |
'(-a --all-packages)'{-a,--all-packages}'[search in all available packages (slow)]:all packages:->packages' \ |
61 |
- '(-d --direct -D --indirect)'{-d,--direct}'[search direct dependencies only (default)]' \ |
62 |
- '(-d --direct -D --indirect)'{-D,--indirect}'[search indirect dependencies (VERY slow)]' \ |
63 |
+ '(-D --indirect)'{-D,--indirect}'[search indirect dependencies (VERY slow)]' \ |
64 |
+ '--depth[limit indirect dependency tree to specified depth]:number:' \ |
65 |
'*:package:_packages installed' && ret=0 |
66 |
;; |
67 |
depgraph|g) |
68 |
_arguments \ |
69 |
+ '(-A --no-atom)'{-A,--no-atom}'[do not show dependency atom]' \ |
70 |
+ '(-M --no-mask)'{-M,--no-mask}'[do not show masking status]' \ |
71 |
'(-U --no-useflags)'{-U,--no-useflags}'[do not show USE flags]' \ |
72 |
'(-l --linear)'{-l,--linear}'[do not use fancy formatting]' \ |
73 |
':package:_packages installed' && ret=0 |
74 |
;; |
75 |
files|f) |
76 |
_arguments \ |
77 |
- '--timestamp[append timestamp]' \ |
78 |
- '--md5sum[append md5sum]' \ |
79 |
- '--type[prepend file type]' \ |
80 |
+ '(-m --md5sum)'{-m,--md5sum}'[include MD5 sum in output]' \ |
81 |
+ '(-s --timestamp)'{-s,--timestamp}'[include timestamp in output]' \ |
82 |
+ '(-t --type)'{-t,--type}'[include file type in output]' \ |
83 |
+ '--tree[display results in a tree (turns off other options)]' \ |
84 |
'--filter=[filter output]:filter(s):_values -s , '' dir obj sym dev fifo path conf cmd doc man info' \ |
85 |
':installed pkgname:_packages installed' && ret=0 |
86 |
;; |
87 |
+ has|a) |
88 |
+ _arguments \ |
89 |
+ $common_args \ |
90 |
+ '(-F --format)'{-F,--format}'[a format template (see man page)]:format template' \ |
91 |
+ ':KEY:' \ |
92 |
+ ':VALUE:' && ret=0 |
93 |
+ ;; |
94 |
+ hasuse|h) |
95 |
+ _arguments \ |
96 |
+ $common_args \ |
97 |
+ ':useflag:_gentoo_packages useflag' && ret=0 |
98 |
+ ;; |
99 |
+ list|l) |
100 |
+ _arguments \ |
101 |
+ $common_args \ |
102 |
+ '(-d --duplicates)'{-d,--duplicates}'[list only installed duplicate packages]' \ |
103 |
+ '(-b --binpkgs-missing)'{-b,--binpkgs-missing}'[list only installed packages without a corresponding binary package]' \ |
104 |
+ '(-f --full-regex)'{-f,--full-regex}'[supplied query is a regex]:pattern:' \ |
105 |
+ '(-m --mask-reason)'{-m,--mask-reason}'[include reason for package mask]' \ |
106 |
+ '(-F --format)'{-F,--format}'[a format template (see man page)]:format template' \ |
107 |
+ ': :_guard "^--*" pattern' && ret=0 |
108 |
+ ;; |
109 |
meta|m) |
110 |
_arguments \ |
111 |
'(-d --description)'{-d,--description}'[show an extended package description]' \ |
112 |
'(-H --herd)'{-H,--herd}'[show the herd(s) for the package]' \ |
113 |
'(-k --keywords)'{-k,--keywords}'[show keywords for all matching package versions]' \ |
114 |
+ '(-l --license)'{-l,--license}'[show licenses for the best maching version]' \ |
115 |
'(-m --maintainer)'{-m,--maintainer}'[show the maintainer(s) for the package]' \ |
116 |
'(-S --stablreq)'{-S,--stablreq}'[show STABLEREQ arches (ccs) for all matching package versions]' \ |
117 |
'(-u --useflags)'{-u,--useflags}'[show per-package USE flag descriptions]' \ |
118 |
@@ -141,37 +175,25 @@ _equery () { |
119 |
'(-x --xml)'{-x,--xml}'[show the plain metadata.xml file]' \ |
120 |
':package:_packages available' && ret=0 |
121 |
;; |
122 |
- hasuse|h) |
123 |
- _arguments \ |
124 |
- $common_args \ |
125 |
- ':useflag:_gentoo_packages useflag' && ret=0 |
126 |
- ;; |
127 |
- list|l) |
128 |
- _arguments \ |
129 |
- $common_args \ |
130 |
- ': :_guard "^--*" pattern' && ret=0 |
131 |
- ;; |
132 |
- size|s) |
133 |
+ size|s) |
134 |
_arguments \ |
135 |
'(-b --bytes)'{-b,--bytes}'[report size in bytes]' \ |
136 |
+ '(-f --full-regex)'{-f,--full-regex}'[supplied query is a regex]:pattern:' \ |
137 |
':package:_packages installed' && ret=0 |
138 |
;; |
139 |
- which|w) |
140 |
- _arguments \ |
141 |
- ':portage:_packages available' && ret=0 |
142 |
- ;; |
143 |
uses|u) |
144 |
_arguments \ |
145 |
- {--all,-a}'[include non-installed packages]' \ |
146 |
+ '(-a --all)'{-a,--all}'[include non-installed packages]' \ |
147 |
+ '(-i --ignore-linguas)'{-i,--ignore-linguas}"[don't show linguas USE flags]" \ |
148 |
":portage:_packages installed" && ret=0 |
149 |
;; |
150 |
- changes|c) |
151 |
+ which|w) |
152 |
_arguments \ |
153 |
- '(-l --latest)'{-l,--latest}'[only display latest ChangeLog entry]' \ |
154 |
- '(-f --full)'{-f,--full}'[display full ChangeLog entry]' \ |
155 |
+ '(-m --include-masked)'{-m,--include-masked}'[return highest version ebuild available]' \ |
156 |
+ '(-e --ebuild)'{-e,--ebuild}'[print the ebuild]' \ |
157 |
':portage:_packages available' && ret=0 |
158 |
;; |
159 |
- *) |
160 |
+ *) |
161 |
_message 'command not found' |
162 |
;; |
163 |
esac |