diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-30 10:08:37 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-30 10:08:37 +0000 |
commit | c8236cdb4906e9e3acc3bd160f810f50fc5d985e (patch) | |
tree | 65b430b26ef7e491c73788c1790cf95661ff6342 /Completion/Rpm | |
parent | d335ab27a7b0a6926e9d211ca22fd1f065fd258a (diff) | |
download | zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.tar.gz zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.tar.xz zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.zip |
Initial revision
Diffstat (limited to 'Completion/Rpm')
-rw-r--r-- | Completion/Rpm/_rpm | 15 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_arguments | 8 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_build | 16 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_capability | 3 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_install | 10 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_package | 6 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_pkg_file | 7 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_pkg_or_file | 8 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_query | 12 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_rebuild | 6 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_rebuilddb | 3 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_relocate | 11 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_resign | 4 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_sigcheck | 5 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_tags | 11 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_uninstall | 7 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_upgrade | 3 | ||||
-rw-r--r-- | Completion/Rpm/_rpm_verify | 7 |
18 files changed, 142 insertions, 0 deletions
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' |