From 1d6c3eaaa0618d35329495a324c9fd2e7ed9843a Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 30 Aug 1999 10:08:13 +0000 Subject: zsh-workers/7533 --- Completion/Rpm/_rpm | 15 +++++++++++++++ Completion/Rpm/_rpm_arguments | 8 ++++++++ Completion/Rpm/_rpm_build | 16 ++++++++++++++++ Completion/Rpm/_rpm_capability | 3 +++ Completion/Rpm/_rpm_install | 10 ++++++++++ Completion/Rpm/_rpm_package | 6 ++++++ Completion/Rpm/_rpm_pkg_file | 7 +++++++ Completion/Rpm/_rpm_pkg_or_file | 8 ++++++++ Completion/Rpm/_rpm_query | 12 ++++++++++++ Completion/Rpm/_rpm_rebuild | 6 ++++++ Completion/Rpm/_rpm_rebuilddb | 3 +++ Completion/Rpm/_rpm_relocate | 11 +++++++++++ Completion/Rpm/_rpm_resign | 4 ++++ Completion/Rpm/_rpm_sigcheck | 5 +++++ Completion/Rpm/_rpm_tags | 11 +++++++++++ Completion/Rpm/_rpm_uninstall | 7 +++++++ Completion/Rpm/_rpm_upgrade | 3 +++ Completion/Rpm/_rpm_verify | 7 +++++++ 18 files changed, 142 insertions(+) create mode 100644 Completion/Rpm/_rpm create mode 100644 Completion/Rpm/_rpm_arguments create mode 100644 Completion/Rpm/_rpm_build create mode 100644 Completion/Rpm/_rpm_capability create mode 100644 Completion/Rpm/_rpm_install create mode 100644 Completion/Rpm/_rpm_package create mode 100644 Completion/Rpm/_rpm_pkg_file create mode 100644 Completion/Rpm/_rpm_pkg_or_file create mode 100644 Completion/Rpm/_rpm_query create mode 100644 Completion/Rpm/_rpm_rebuild create mode 100644 Completion/Rpm/_rpm_rebuilddb create mode 100644 Completion/Rpm/_rpm_relocate create mode 100644 Completion/Rpm/_rpm_resign create mode 100644 Completion/Rpm/_rpm_sigcheck create mode 100644 Completion/Rpm/_rpm_tags create mode 100644 Completion/Rpm/_rpm_uninstall create mode 100644 Completion/Rpm/_rpm_upgrade create mode 100644 Completion/Rpm/_rpm_verify (limited to 'Completion/Rpm') diff --git a/Completion/Rpm/_rpm b/Completion/Rpm/_rpm new file mode 100644 index 000000000..4a64bbfbb --- /dev/null +++ b/Completion/Rpm/_rpm @@ -0,0 +1,15 @@ +#compdef rpm + +_rpm_arguments \ + '-q:*:query: _rpm_query' \ + -{V,y,-{setperms,setugids,querytags,initdb,showrc}} \ + '-pipe:*:pipe command:_command_names -e' \ + '--verify:*:verify: _rpm_verify' \ + -{i,-install}':*:install: _rpm_install' \ + -{U,-upgrade}':*:upgrade: _rpm_upgrade' \ + -{e,-erase}':*:uninstall: _rpm_uninstall' \ + -'b+:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages)):*:build: _rpm_build -b' \ + -'t+:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages)):*:build: _rpm_build -t' \ + --{rebuild,rmsource,recompile,resign,addsign}':*:RPM package: _rpm_package' \ + -{K,-checksig}':*:sigcheck: _rpm_sigcheck' \ + '--rebuilddb:*:rebuild: _rpm_rebuild' diff --git a/Completion/Rpm/_rpm_arguments b/Completion/Rpm/_rpm_arguments new file mode 100644 index 000000000..caac00b25 --- /dev/null +++ b/Completion/Rpm/_rpm_arguments @@ -0,0 +1,8 @@ +#autoload + +_arguments \ + -{v,vv} \ + '-rcfile:resource file:_files' \ + '--ftpproxy:FTP proxy server:_hosts' \ + '--ftpport:FTP port number:' \ + "$@" diff --git a/Completion/Rpm/_rpm_build b/Completion/Rpm/_rpm_build new file mode 100644 index 000000000..1702e5d8e --- /dev/null +++ b/Completion/Rpm/_rpm_build @@ -0,0 +1,16 @@ +#autoload + +local args + +if [[ "$1" = -b ]]; then + args='*:RPM package:_rpm_package' +else + args='*:tar file:_files -g \*.\(\#i\)tar\(.\*\|\)' +fi + +_rpm_arguments \ + --{short-circuit,clean,rmsource,sign,test} \ + '--buildroot:build root directory:_files -/' \ + '--buildarch:architecture for which to build:' \ + '--buildos:ositecture for which to build:' \ + '--timecheck:time check (seconds):' "$args" diff --git a/Completion/Rpm/_rpm_capability b/Completion/Rpm/_rpm_capability new file mode 100644 index 000000000..5bd8a1afe --- /dev/null +++ b/Completion/Rpm/_rpm_capability @@ -0,0 +1,3 @@ +#autoload + +_message 'RPM capability' diff --git a/Completion/Rpm/_rpm_install b/Completion/Rpm/_rpm_install new file mode 100644 index 000000000..173a5a620 --- /dev/null +++ b/Completion/Rpm/_rpm_install @@ -0,0 +1,10 @@ +#autoload + +_rpm_arguments \ + "$@" \ + -{-{badreloc,excludedocs,force,hash,allfiles,ignorearch,ignoreos,includedocs,justdb,nodeps,noorder,noscripts,notriggers,percent,replacefiles,replacepkgs,test},h} \ + '--relocate:relocate:_rpm_relocate' \ + '--prefix:package prefix directory:_files -/' \ + '--root:RPM root directory:_files -/' \ + '--dbpath:RPM database path:_files -/' \ + '*:pkg file:_rpm_pkg_file' diff --git a/Completion/Rpm/_rpm_package b/Completion/Rpm/_rpm_package new file mode 100644 index 000000000..0cac1c917 --- /dev/null +++ b/Completion/Rpm/_rpm_package @@ -0,0 +1,6 @@ +#autoload + +local expl + +_description expl 'RPM package' +compadd "$expl[@]" -M 'r:|-=* r:|=*' - $(rpm -qa) diff --git a/Completion/Rpm/_rpm_pkg_file b/Completion/Rpm/_rpm_pkg_file new file mode 100644 index 000000000..2a211a28a --- /dev/null +++ b/Completion/Rpm/_rpm_pkg_file @@ -0,0 +1,7 @@ +#autoload + +if compset -P ftp:; then + _hosts -S/ +else + _files -g '*.(#i)rpm' +fi diff --git a/Completion/Rpm/_rpm_pkg_or_file b/Completion/Rpm/_rpm_pkg_or_file new file mode 100644 index 000000000..5af265df6 --- /dev/null +++ b/Completion/Rpm/_rpm_pkg_or_file @@ -0,0 +1,8 @@ +#autoload + +local ret=1 + +_rpm_package && ret=0 +_rpm_pkg_file && ret=0 + +return ret diff --git a/Completion/Rpm/_rpm_query b/Completion/Rpm/_rpm_query new file mode 100644 index 000000000..8721f5498 --- /dev/null +++ b/Completion/Rpm/_rpm_query @@ -0,0 +1,12 @@ +#autoload + +_rpm_arguments \ + '--root:RPM root directory:_files -/' \ + '--dbpath:RPM database path:_files -/' \ + '--queryformat:RPM query format:_rpm_tags' \ + '-f:file:_files' \ + '-p:RPM package file:_rpm_pkg_file' \ + '--triggeredby:RPM package:_rpm_package' \ + '--whatprovides:RPM capability:_rpm_capability' \ + '--whatrequires:RPM capability:_rpm_capability' \ + '*:RPM package:_rpm_pkg_or_file' diff --git a/Completion/Rpm/_rpm_rebuild b/Completion/Rpm/_rpm_rebuild new file mode 100644 index 000000000..e924a3b9f --- /dev/null +++ b/Completion/Rpm/_rpm_rebuild @@ -0,0 +1,6 @@ +#autoload + +_rpm_arguments \ + '--root:RPM root directory:_files -/' \ + '--dbpath:RPM database path:_files -/' \ + '*:RPM source package file:_rpm_pkg_file' diff --git a/Completion/Rpm/_rpm_rebuilddb b/Completion/Rpm/_rpm_rebuilddb new file mode 100644 index 000000000..0ab92aa6f --- /dev/null +++ b/Completion/Rpm/_rpm_rebuilddb @@ -0,0 +1,3 @@ +#autoload + +_rpm_arguments diff --git a/Completion/Rpm/_rpm_relocate b/Completion/Rpm/_rpm_relocate new file mode 100644 index 000000000..fd27bdd99 --- /dev/null +++ b/Completion/Rpm/_rpm_relocate @@ -0,0 +1,11 @@ +#autoload + +local expl + +if compset -P '*\='; then + _description expl 'new path' +else + _description expl 'old path' +fi + +_files "$expl[@]" -/ diff --git a/Completion/Rpm/_rpm_resign b/Completion/Rpm/_rpm_resign new file mode 100644 index 000000000..ef9dd932e --- /dev/null +++ b/Completion/Rpm/_rpm_resign @@ -0,0 +1,4 @@ +#autoload + +_rpm_arguments \ + '*:RPM binary package file:_rpm_pkg_file' diff --git a/Completion/Rpm/_rpm_sigcheck b/Completion/Rpm/_rpm_sigcheck new file mode 100644 index 000000000..a808197a8 --- /dev/null +++ b/Completion/Rpm/_rpm_sigcheck @@ -0,0 +1,5 @@ +#autoload + +_rpm_arguments \ + --no{pgp,md5} \ + '*:RPM package file:_rpm_pkg_or_file' diff --git a/Completion/Rpm/_rpm_tags b/Completion/Rpm/_rpm_tags new file mode 100644 index 000000000..2e65b39f3 --- /dev/null +++ b/Completion/Rpm/_rpm_tags @@ -0,0 +1,11 @@ +#autoload + +if compset -P '*\{'; then + local expl + + _description expl 'RPM tag' + compadd "$expl[@]" -M 'm:{a-z}={A-Z}' -S '}' - \ + "${(@)${(@f)$(rpm --querytags)}#RPMTAG_}" +else + _message 'RPM format' +fi diff --git a/Completion/Rpm/_rpm_uninstall b/Completion/Rpm/_rpm_uninstall new file mode 100644 index 000000000..c33852d50 --- /dev/null +++ b/Completion/Rpm/_rpm_uninstall @@ -0,0 +1,7 @@ +#autoload + +_rpm_arguments \ + --{allmatches,justdb,nodeps,noorder,noscripts,notriggers} \ + '--root:RPM root directory:_files -/' \ + '--dbpath:RPM database path:_files -/' \ + '*:RPM package:_rpm_package' diff --git a/Completion/Rpm/_rpm_upgrade b/Completion/Rpm/_rpm_upgrade new file mode 100644 index 000000000..3417b2b11 --- /dev/null +++ b/Completion/Rpm/_rpm_upgrade @@ -0,0 +1,3 @@ +#autoload + +_rpm_install --oldpackage diff --git a/Completion/Rpm/_rpm_verify b/Completion/Rpm/_rpm_verify new file mode 100644 index 000000000..049933f6f --- /dev/null +++ b/Completion/Rpm/_rpm_verify @@ -0,0 +1,7 @@ +#autoload + +_rpm_arguments \ + --no{deps,md5,files} \ + '--root:RPM root directory:_files -/' \ + '--dbpath:RPM database path:_files -/' \ + '*:RPM package:_rpm_package' -- cgit 1.4.1