Gentoo Archives: gentoo-commits

From: Vadim Misbakh-Soloviov <mva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/zsh-completion:master commit in: src/
Date: Wed, 19 Feb 2020 18:48:05
Message-Id: 1582138052.f2a2c5b91f969ad1e620b7975b15774878d9c324.mva@gentoo
1 commit: f2a2c5b91f969ad1e620b7975b15774878d9c324
2 Author: Thomas Rüd <mail <AT> thomas-rued <DOT> com>
3 AuthorDate: Wed Feb 19 11:08:18 2020 +0000
4 Commit: Vadim Misbakh-Soloviov <mva <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 19 18:47:32 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/zsh-completion.git/commit/?id=f2a2c5b9
7
8 Update portage-utils completion
9
10 Signed-off-by: Thomas Rüd <mail <AT> thomas-rued.com>
11 Signed-off-by: Vadim Misbakh-Soloviov <mva <AT> gentoo.org>
12
13 src/_portage_utils | 161 ++++++++++++++++++++++++++++++++---------------------
14 1 file changed, 98 insertions(+), 63 deletions(-)
15
16 diff --git a/src/_portage_utils b/src/_portage_utils
17 index 9077f30..3508061 100644
18 --- a/src/_portage_utils
19 +++ b/src/_portage_utils
20 @@ -1,4 +1,4 @@
21 -#compdef qatom qcache qcheck qdepends qfile qgrep qlist qlop qpkg qsearch qsize qtbz2 quse qxpak
22 +#compdef qatom qcheck qdepends qfile qgrep qkeyword qlist qlop qmanifest qmerge qpkg qsearch qsize qtbz2 quse qxpak
23
24 # portage-utils-0.53
25
26 @@ -16,68 +16,52 @@ common_args=(
27 case $service in
28 qatom)
29 _arguments -s $common_args \
30 - {'(--compare)-c','(-c)--compare'}'[Compare two atoms]'
31 - ;;
32 - qcache)
33 - local arches
34 - arches=( $(_gentoo_arches) )
35 -
36 - _arguments -s $common_args \
37 - {'(--matchpkg)-p','(-p)--matchpkg'}'[match pkgname]:package name:_gentoo_packages available_pkgnames_only' \
38 - {'(--matchcat)-c','(-c)--matchcat'}'[match catname]:category:_gentoo_packages category' \
39 - {'(--imlate)-i','(-i)--imlate'}'[list packages that can be marked stable on a given arch]' \
40 - {'(--dropped)-d','(-d)--dropped'}'[list packages that have dropped keywords on a version bump on a given arch]' \
41 - {'(--testing)-t','(-t)--testing'}'[list packages that have ~arch versions, but no stable versions on a given arch]' \
42 - {'(--stats)-s','(-s)--stats'}'[display statistics about the portage tree]' \
43 - {'(--all)-a','(-a)--all'}'[list packages that have at least one version keyworded for on a given arch]' \
44 - {'(--not)-n','(-n)--not'}"[list packages that aren't keyworded on a given arch]"
45 -
46 - _describe -t available-arches "arch" arches
47 + {'(--format)-F','(-F)--format'}'[Custom output format]:format' \
48 + {'(--compare)-c','(-c)--compare'}'[Compare two atoms]' \
49 + {'(--print)-p','(-p)--print'}'[Print reconstructed atom]' \
50 + '*:package-atom'
51 ;;
52 qcheck)
53 _arguments -s $common_args \
54 - {'(--all)-a','(-a)--all'}'[List all packages]' \
55 - {'(--exact)-e','(-e)--exact'}'[Exact match (only CAT/PN or PN without PV)]' \
56 + {'(--format)-F','(-F)--format'}'[Custom output format]:format' \
57 {'(--skip)-s','(-s)--skip'}'[Ignore files matching regular expression]:regex' \
58 {'(--update)-u','(-u)--update'}'[Update missing files, chksum and mtimes for packages]' \
59 {'(--noafk)-A','(-A)--noafk'}'[Ignore missing files]' \
60 {'(--badonly)-B','(-B)--badonly'}'[Only print pkgs containing bad files]' \
61 {'(--nohash)-H','(-H)--nohash'}'[Ignore differing/unknown file chksums]' \
62 {'(--nomtime)-T','(-T)--nomtime'}'[Ignore differing file mtimes]' \
63 - '--skip-protected[Ignore files in CONFIG_PROTECT-ed paths]' \
64 + {'(--skip-protected)-P','(-P)--skin-protected'}'[Ignore files in CONFIG_PROTECT-ed paths]' \
65 {'(--prelink)-p','(-p)--prelink'}'[Undo prelink when calculating checksums]' \
66 '*:packages:_gentoo_packages installed'
67 ;;
68 qdepends)
69 _arguments -s $common_args \
70 - {'(--depend)-d','(-d)--depend'}'[Show DEPEND info (default)]' \
71 + {'(--depend)-d','(-d)--depend'}'[Show DEPEND info]' \
72 {'(--rdepend)-r','(-r)--rdepend'}'[Show RDEPEND info]' \
73 {'(--pdepend)-p','(-p)--pdepend'}'[Show PDEPEND info]' \
74 - {'(--key)-k','(-k)--key'}'[User defined vdb key]:vdb key' \
75 + {'(--bdepend)-b','(-b)--bdepend'}'[Show BDEPEND info]' \
76 {'(--query)-Q','(-Q)--query'}'[Query reverse deps]' \
77 - {'(--name-only)-N','(-N)--name-only'}'[Only show package name]' \
78 - {'(--all)-a','(-a)--all'}'[Show all DEPEND info]' \
79 - {'(--format)-f','(-f)--format'}'[Pretty format specified depend strings]' \
80 + {'(--installed)-i','(-i)--installed'}'[Search installed packages using VDB]' \
81 + {'(--tree)-t','(-t)--tree'}'[Search available ebuilds in the tree]:packages:_gentoo_packages available' \
82 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]:format' \
83 + {'(--pretty)-S','(-S)--pretty'}'[Pretty format specified depend strings]' \
84 '*:packages:_gentoo_packages installed'
85 ;;
86 qfile)
87 _arguments -s $common_args \
88 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]' \
89 {'(--slots)-S','(-S)--slots'}'[Display installed packages with slots]' \
90 {'(--root-prefix)-R','(-R)--root-prefix'}'[Assume arguments are already prefixed by $ROOT]' \
91 - {'(--from)-f','(-f)--from'}'[Read arguments from file <arg> ("-" for stdin)]' \
92 - {'(--max-args)-m','(-m)--max-args'}'[Treat from file arguments by groups of <arg> (defaults to 5000)]:number' \
93 - {'(--basename)-b','(-b)--basename'}'[Match any component of the path]' \
94 + {'(--dir)-d','(-d)--dir'}'[Also match directories for single component arguments]' \
95 {'(--orphans)-o','(-o)--orphans'}'[List orphan files]' \
96 {'(--exclude)-x','(-x)--exclude'}"[Don't look in package <arg> (used with --orphans)]:package:_gentoo_packages installed" \
97 - {'(--exact)-e','(-e)--exact'}'[Exact match (used with --exclude)]' \
98 '*:filename:_files'
99 ;;
100 qgrep)
101 _arguments -s $common_args \
102 {'(--invert-match)-I','(-I)--invert-match'}'[Select non-matching lines]' \
103 {'(--ignore-case)-i','(-i)--ignore-case'}'[Ignore case distinctions]' \
104 - {'(--with-filename)-H','(-H)--with-filename'}'[Print the filename for each match]' \
105 - {'(--with-name)-N','(-N)--with-name'}'[Print the package or eclass name for each match]' \
106 + {'(--with-name)-N','(-N)--with-name'}'[Print the filename for each match]' \
107 {'(--count)-c','(-c)--count'}'[Only print a count of matching lines per FILE]' \
108 {'(--list)-l','(-l)--list'}'[Only print FILE names containing matches]' \
109 {'(--invert-list)-L','(-L)--invert-list'}'[Only print FILE names containing no match]' \
110 @@ -86,72 +70,119 @@ case $service in
111 {'(--installed)-J','(-J)--installed'}'[Search in installed ebuilds instead of the tree]' \
112 {'(--eclass)-E','(-E)--eclass'}'[Search in eclasses instead of ebuilds]' \
113 {'(--skip-comments)-s','(-s)--skip-comments'}'[Skip comments lines]' \
114 + {'(--repo)-R','(-R)--repo'}'[Print source repository name for each match (implies -N)]' \
115 {'(--skip)-S','(-S)--skip'}'[Skip lines matching <arg>]:pattern' \
116 {'(--before)-B','(-B)--before'}'[Print <arg> lines of leading context]:number' \
117 {'(--after)-A','(-A)--after'}'[Print <arg> lines of trailing context]:number' \
118 '*:pattern::'
119 ;;
120 +
121 + qkeyword)
122 + local arches
123 + arches=( $(_gentoo_arches) )
124 +
125 + _arguments -s $common_args \
126 + {'(--matchpkg)-p','(-p)--matchpkg'}'[match pkgname]:package name:_gentoo_packages available_pkgnames_only' \
127 + {'(--matchcat)-c','(-c)--matchcat'}'[match catname]:category:_gentoo_packages category' \
128 + {'(--matchmaint)-m','(-m)--matchmaint'}'[match maintainer email from metadata.xml (slow)]:email' \
129 + {'(--imlate)-i','(-i)--imlate'}'[list packages that can be marked stable on a given arch]' \
130 + {'(--dropped)-d','(-d)--dropped'}'[list packages that have dropped keywords on a version bump on a given arch]' \
131 + {'(--testing)-t','(-t)--testing'}'[list packages that have ~arch versions, but no stable versions on a given arch]' \
132 + {'(--stats)-s','(-s)--stats'}'[display statistics about the portage tree]' \
133 + {'(--all)-a','(-a)--all'}'[list packages that have at least one version keyworded for on a given arch]' \
134 + {'(--not)-n','(-n)--not'}"[list packages that aren't keyworded on a given arch]"
135 +
136 + _describe -t available-arches "arch" arches
137 + ;;
138 qlist)
139 _arguments -s $common_args \
140 {'(--installed)-I','(-I)--installed'}'[Just show installed packages]' \
141 - {'(--slots)-S','(-S)--slots'}'[Display installed packages with slots]' \
142 + {'(--slots)-S','(-S)--slots'}'[Display installed packages with slots (use twice for subslots)]' \
143 {'(--repo)-R','(-R)--repo'}'[Display installed packages with repository]' \
144 {'(--umap)-U','(-U)--umap'}'[Display installed packages with flags used]' \
145 {'(--columns)-c','(-c)--columns'}'[Display column view]' \
146 - '--show-debug[Show debug files]' \
147 + '--show-debug[Show /usr/lib/debug and /usr/src/debug files]' \
148 {'(--exact)-e','(-e)--exact'}'[Exact match (only CAT/PN or PN without PV)]' \
149 {'(--all)-a','(-a)--all'}'[Show every installed package]' \
150 {'(--dir)-d','(-d)--dir'}'[Only show directories]' \
151 {'(--obj)-o','(-o)--obj'}'[Only show objects]' \
152 {'(--sym)-s','(-s)--sym'}'[Only show symlinks]' \
153 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]:format' \
154 '*:packages:_gentoo_packages installed'
155 ;;
156 qlop)
157 _arguments -s $common_args \
158 - {'(--gauge)-g','(-g)--gauge'}'[Gauge number of times a package has been merged]' \
159 - {'(--time)-t','(-t)--time'}'[Calculate merge time for a specific package]' \
160 - {'(--human)-H','(-H)--human'}'[Print seconds in human readable format (needs -t)]' \
161 - {'(--list)-l','(-l)--list'}'[Show merge history]' \
162 - {'(--unlist)-u','(-u)--unlist'}'[Show unmerge history]' \
163 + {'(--summary)-c','(-c)--summary'}'[Print summary of average merges (implies -a)]' \
164 + {'(--time()-t','(-t)--time'}'[Print time taken to complete action]' \
165 + {'(--average)-a','(-a)--average'}'[Print average time taken to complete action]' \
166 + {'(--human)-H','(-H)--human'}'[Print elapsed time in human readable format (use with -t or -a)]' \
167 + {'(--machine)-M','(-M)--machine'}'[Print elapsed time as seconds with no formatting]' \
168 + {'(--merge)-m','(-m)--merge'}'[Show merge history]' \
169 + {'(--unmerge)-u','(-u)--unmerge'}'[Show unmerge history]' \
170 + {'(--autoclean)-U','(-U)--autoclean'}'[Show autoclean unmerge history]' \
171 {'(--sync)-s','(-s)--sync'}'[Show sync history]' \
172 - {'(--current)-c','(-c)--current'}'[Show current emerging packages]' \
173 - {'(--logfile)-f','(-f)--logfile'}'[Read emerge logfile instead of $EMERGE_LOG_DIR/emerge.log]:log:_files' \
174 + {'(--endtime)-e','(-e)--endtime'}'[Report time at which the operation finished (iso started)]' \
175 + {'(--running)-r','(-r)--running'}'[Show current emerging packages]' \
176 + {'(--date)-d','(-d)--date'}'[Limit selection to this time (1st -d is start, 2nd -d is end)]:date' \
177 + {'(--lastmerge)-l','(-l)--lastmerge'}'[Limit selection to last Portage emerge action]' \
178 + {'(--logfile)-f','(-f)--logfile'}'[Read emerge logfile instead of $EMERGE_LOG_DIR/emerge.log]:filename:_files' \
179 + {'(--atoms)-w','(-w)--atoms'}'[Read package atoms to report from file]:filename:_files' \
180 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]:format' \
181 + '*:packages:_gentoo_packages available'
182 + ;;
183 + qmanifest)
184 + _arguments -s $common_args \
185 + {'(--generate)-g','(-g)--generate'}'[Generate thick Manifests]' \
186 + {'(--signas)-s','(-s)--signas'}'[Sign generated Manifest using GPG key]:public key:_gpg public-keys' \
187 + {'(--passphrase)-p','(-p)--passphrase'}'[Ask for GPG key password (instead of relying on gpg-agent)]' \
188 + {'(--dir)-d','(-d)--dir'}'[Tread arguments as directories]:directory:_files -/' \
189 + {'(--overlay)-o','(-o)--overlay'}'[Treat arguments as overlay names]:overlay:_gentoo_repos -o' \
190 + ;;
191 + qmerge)
192 + _arguments -s $common_args \
193 + {'(--fetch)-f','(-f)--fetch'}'[Fetch package and newest Packages metadata]' \
194 + {'(--force)-F','(-F)--force'}'[Fetch package (skipping Packages)]' \
195 + {'(--search)-s','(-s)--search'}'[Search available packages]' \
196 + {'(--instal)-K','(-K)--install'}'[Install package]' \
197 + {'(--unmerge)-U','(-U)--unmerge'}'[Uninstall package]' \
198 + {'(--pretent)-p','(-p)--pretend'}'[Pretend only]' \
199 + {'(--update)-u','(-u)--update'}'[Update only]' \
200 + {'(--yes)-y','(-y)--yes'}"[Don't prompt before overwriting]" \
201 + {'(--nodeps)-O','(-O)--nodeps'}"[Don't merge dependencies]" \
202 + '--debug[Run shell funcs with `set -x`]' \
203 '*:packages:_gentoo_packages available'
204 ;;
205 + qpkg)
206 + _arguments -s $common_args \
207 + {'(--clean)-c','(-c)--clean'}'[clean pkgdir of unused binary files]' \
208 + {'(--eclean)-E','(-E)--eclean'}'[clean pkgdir of files not in the tree anymore (slow)]' \
209 + {'(--pretend)-p','(-p)--pretend'}'[pretend only]' \
210 + {'(--pkgdir)-P','(-P)--pkgdir'}'[alternate package directory]:alternate pkgdir:_files -/' \
211 + '*:Installed packages:_gentoo_packages installed_versions'
212 + ;;
213 qsearch)
214 _arguments -s $common_args \
215 {'(--all)-a','(-a)--all'}'[List the descriptions of every package in the cache]' \
216 - {'(--cache)-c','(-c)--cache'}'[Use the portage cache]' \
217 - {'(--ebuilds)-e','(-e)--ebuilds'}'[Use the portage ebuild tree]' \
218 {'(--search)-s','(-s)--search'}'[Regex search package basenames]' \
219 - {'(--desc)-S','(-S)--desc'}'[Regex search package descriptions]' \
220 + {'(--desc)-S','(-S)--desc'}'[Regex search package descriptions (or homepage when using -H)]' \
221 {'(--name-only)-N','(-N)--name-only'}'[Only show package name]' \
222 - {'(--homepage)-H','(-H)--homepage'}'[Show homepage info]' \
223 + {'(--homepage)-H','(-H)--homepage'}'[Show homepage info instead of description]' \
224 + {'(--repo)-R','(-R)--repo'}'[Show repository the ebuild originates from]' \
225 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]:format' \
226 '*:pattern::'
227 ;;
228 qsize)
229 _arguments -s $common_args \
230 {'(--filesystem)-f','(-f)--filesystem'}'[Show size used on disk]' \
231 - {'(--all)-a','(-a)--all'}'[Size all installed packages]' \
232 {'(--sum)-s','(-s)--sum'}'[Include a summary]' \
233 {'(--sum-only)-S','(-S)--sum-only'}'[Show just the summary]' \
234 {'(--megabytes)-m','(-m)--megabytes'}'[Display size in megabytes]' \
235 {'(--kilobytes)-k','(-k)--kilobytes'}'[Display size in kilobytes]' \
236 {'(--bytes)-b','(-b)--bytes'}'[Display size in bytes]' \
237 {'(--ignore)-i','(-i)--ignore'}'[Ignore regexp string]:pattern' \
238 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]:format' \
239 '*:packages:_gentoo_packages installed'
240 ;;
241 - quse)
242 - _arguments -s $common_args \
243 - {'(--exact)-e','(-e)--exact'}'[Show exact non regexp matching using strcmp]' \
244 - {'(--all)-a','(-a)--all'}'[Show annoying things in IUSE]' \
245 - {'(--keywords)-K','(-K)--keywords'}'[Use the KEYWORDS vs IUSE]' \
246 - {'(--license)-L','(-L)--license'}'[Use the LICENSE vs IUSE]' \
247 - {'(--describe)-D','(-D)--describe'}'[Describe the USE flag]' \
248 - {'(--format)-F','(-F)--format'}'[Use your own variable formats: -F NAME=]:format' \
249 - {'(--name-only)-N','(-N)--name-only'}'[Only show package name]' \
250 - '*:use flag:_gentoo_packages useflag'
251 - ;;
252 qtbz2)
253 _arguments -s $common_args \
254 {'(--dir)-d','(-d)--dir'}'[Change to specified directory]:directory:_files -/' \
255 @@ -161,13 +192,17 @@ case $service in
256 {'(--xpak)-x','(-x)--xpak'}'[Just split the xpak]:tbz2 file:_files -g \*.tbz2' \
257 {'(--stdout)-O','(-O)--stdout'}'[Write files to stdout]'
258 ;;
259 - qpkg)
260 + quse)
261 _arguments -s $common_args \
262 - {'(--clean)-c','(-c)--clean'}'[clean pkgdir of unused binary files]' \
263 - {'(--eclean)-E','(-E)--eclean'}'[clean pkgdir of files not in the tree anymore (slow)]' \
264 - {'(--pretend)-p','(-p)--pretend'}'[pretend only]' \
265 - {'(--pkgdir)-P','(-P)--pkgdir'}'[alternate package directory]:alternate pkgdir:_files -/' \
266 - '*:Installed packages:_gentoo_packages installed_versions'
267 + {'(--exact)-e','(-e)--exact'}'[Show exact non regexp matching using strcmp]' \
268 + {'(--all)-a','(-a)--all'}"[List all ebuilds, don't match anything]" \
269 + {'(--license)-L','(-L)--license'}'[Use the LICENSE vs IUSE]' \
270 + {'(--describe)-D','(-D)--describe'}'[Describe the USE flag]' \
271 + {'(--installed)-I','(-I)--installed'}'[Only search installed packages]' \
272 + {'(--package)-p','(-p)--package'}'[Restrict matching to package or category]:package:gentoo_packages available' \
273 + {'(--repo)-R','(-R)--repo'}'[Show repository the ebuild originates from]' \
274 + {'(--format)-F','(-F)--format'}'[Print matched atom using given format string]:format' \
275 + '*:useflag:_gentoo_packages useflag'
276 ;;
277 qxpak)
278 _arguments -s $common_args \