--- /usr/share/zsh/Completion/Redhat/_rpm- 2004-08-23 06:08:09 +0000 +++ /usr/share/zsh/Completion/Redhat/_rpm- 2004-10-16 02:31:20 +0000 @@ -1,4 +1,4 @@ -#compdef rpm +#compdef rpm rpmquery rpmbuild # This uses `_arguments' in a state-machine kind of way. These states # have names and before executing the default action for such a state @@ -86,6 +86,12 @@ _rpm () { '--dbpath:rpm database path:_files -/' ) +case "$service" in + rpmquery) + state=query + ;; + rpm|rpmbuild) + _arguments -C -s \ "${commonopts[@]}" \ {-q+,--query}'[query mode]:*:query:->query' \ @@ -107,6 +113,9 @@ _rpm () { --{rebuild,recompile}':*:source rpm file:->package_src' \ '--eval:macro:->macros' && ret=0 + ;; +esac + # As long as we have a state name... while [[ -n "$state" ]]; do