Lines 1-4
Link Here
|
1 |
#compdef rpm |
1 |
#compdef rpm rpmquery rpmbuild |
2 |
|
2 |
|
3 |
# This uses `_arguments' in a state-machine kind of way. These states |
3 |
# This uses `_arguments' in a state-machine kind of way. These states |
4 |
# have names and before executing the default action for such a state |
4 |
# have names and before executing the default action for such a state |
Lines 86-91
_rpm () {
Link Here
|
86 |
'--dbpath:rpm database path:_files -/' |
86 |
'--dbpath:rpm database path:_files -/' |
87 |
) |
87 |
) |
88 |
|
88 |
|
|
|
89 |
case "$service" in |
90 |
rpmquery) |
91 |
state=query |
92 |
;; |
93 |
rpm|rpmbuild) |
94 |
|
89 |
_arguments -C -s \ |
95 |
_arguments -C -s \ |
90 |
"${commonopts[@]}" \ |
96 |
"${commonopts[@]}" \ |
91 |
{-q+,--query}'[query mode]:*:query:->query' \ |
97 |
{-q+,--query}'[query mode]:*:query:->query' \ |
Lines 107-112
_rpm () {
Link Here
|
107 |
--{rebuild,recompile}':*:source rpm file:->package_src' \ |
113 |
--{rebuild,recompile}':*:source rpm file:->package_src' \ |
108 |
'--eval:macro:->macros' && ret=0 |
114 |
'--eval:macro:->macros' && ret=0 |
109 |
|
115 |
|
|
|
116 |
;; |
117 |
esac |
118 |
|
110 |
# As long as we have a state name... |
119 |
# As long as we have a state name... |
111 |
|
120 |
|
112 |
while [[ -n "$state" ]]; do |
121 |
while [[ -n "$state" ]]; do |