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 | |
parent | d335ab27a7b0a6926e9d211ca22fd1f065fd258a (diff) | |
download | zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.tar.gz zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.tar.xz zsh-c8236cdb4906e9e3acc3bd160f810f50fc5d985e.zip |
Initial revision
Diffstat (limited to 'Completion')
-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 | ||||
-rw-r--r-- | Completion/User/_gs | 19 | ||||
-rw-r--r-- | Completion/User/_gs_name | 31 | ||||
-rw-r--r-- | Completion/X/_gv | 14 | ||||
-rw-r--r-- | Completion/X/_xdvi | 30 |
22 files changed, 236 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' diff --git a/Completion/User/_gs b/Completion/User/_gs new file mode 100644 index 000000000..8ecd99570 --- /dev/null +++ b/Completion/User/_gs @@ -0,0 +1,19 @@ +#compdef gs ghostscript + +if compset -N --; then + if [[ CURRENT -eq 1 ]]; then + _ps + else + _message 'userdict ARGUMENTS' + return 1 + fi +else + _x_options \ + -q \ + '-g-:device size (<width>x<height>):' \ + '-r-:resolution (<val> or <x>x<y>):' \ + '-I:search paths:_dir_list' \ + \*-{d,D}'-:def: _gs_name -d' \ + \*-{s,S}'-:def: _gs_name -s' \ + '*:PostScript file:_ps' +fi diff --git a/Completion/User/_gs_name b/Completion/User/_gs_name new file mode 100644 index 000000000..3aef646eb --- /dev/null +++ b/Completion/User/_gs_name @@ -0,0 +1,31 @@ +#autoload + +local expl + +if [[ "$1" = -d ]]; then + if [[ "$PREFIX" = *\=* ]]; then + _message 'systemdict definition value' + else + _description expl 'systemdict definition name' + compadd "$expl[@]" -M 'm:{a-z}={A-Z}' - \ + DISKFONTS NOCACHE NOBIND NODISPLAY NOPAUSE PLATFONTS SAFER \ + WRITESYSTEMDICT + fi +elif compset -P '*\='; then + case "$IPREFIX" in + *DEVICE\=) + _description expl 'ghostscript device' + compadd "$expl[@]" - "${(@)${=${$(gs -h)##* devices:}%%Search path:*}:#}" + ;; + *OutputFile\=) + _description expl 'output file' + _files + ;; + *) + _message 'systemdict value' + return 1 + esac +else + _description expl 'systemdict name' + compadd "$expl[@]" -S\= -M 'm:{a-z}={A-Z}' - DEVICE OutputFile +fi diff --git a/Completion/X/_gv b/Completion/X/_gv new file mode 100644 index 000000000..887224a0f --- /dev/null +++ b/Completion/X/_gv @@ -0,0 +1,14 @@ +#compdef gv gview + +_xt_arguments \ + -{,no}{safer,quiet,center,swap,antialias,dsc,eof,pixmap,watch,resize} \ + -{monochrome,grayscale,color,portrait,landscape,upsidedown,seascape,h,help,v,spartan} \ + + '-arguments:ghostscript arguments:' \ + '-page:label of first page:' \ + '-media:page size:(Letter Legal Statement Tabloid Ledger Folio Quarto 10x14 Executive A3 A4 A5 B4 B5)' \ + '-scale:scale entry:' \ + '-scalebase:scale base:' \ + '-ad:resource file:_files' \ + '-style:resource file:_files' + '*:file:_pspdf' diff --git a/Completion/X/_xdvi b/Completion/X/_xdvi new file mode 100644 index 000000000..ea08e5110 --- /dev/null +++ b/Completion/X/_xdvi @@ -0,0 +1,30 @@ +#compdef xdvi + +_xt_arguments \ + -+{allowshell,copy,expert,hush{,chars,checksums,specials},keep,l,no{ghostscript,grey,gssafer,makepk,postscript,scan},safer,thorough,underlink,version} \ + +{altfont,base,browser,cr,debug,density,gamma,gspalette,hl,icongeometry,interpreter,margin,mfmode,offsets,p,paper,shrink,S,sidemargin,topmargin,xoffset,yoffset,grid{1,2,3},mgs{,1,2,3,4,5}} \ + '-altfont:default font:' \ + '-base:base URL:' \ + '-browser:WWW browser:_command_names -e' \ + '-cr:cursor color:_colors' \ + '-debug:debugging bitmask:((1\:bitmaps 2\:dvi\ translation 4\:pk\ reading 8\:batch\ operation 16\:events 32\:file\ opening 64\:PostScript\ communication 128\:Kpathsea\ statistics 256\:Kpathsea\ hash\ table\ lookups 512\:Kpathsea\ path\ definitions 1024\:Kpathsea\ path\ expansion 2048\:Kpathsea\ searches))' \ + '-density:font shrink density:' \ + '-gamma:anti-aliasing factor (default 1.0):' \ + -grid{1,2,3}':grid color:_colors' \ + '-gspalette:Ghostscript palette:(Color Greyscale Monochrome)' \ + '-hl:page highlight color:_colors' \ + '-icongeometry:icon geometry:_x_geometry' \ + '-interpreter:Ghostscript program:_command_names -e' \ + '-margin:margin size:' \ + '-mfmode:metafont string:' \ + -mgs{,1,2,3,4,5}':magnifier size:' \ + '-offsets:offset size:' \ + '-p:font size (pixel per inch):' \ + '-paper:paper size (<width>x<height> or ...):(us usr legal foolscap a1 a2 a3 a4 a5 a6 a7 b1 b2 b3 b4 b5 b6 b7 c1 c2 c3 c4 c5 c6 c7 a1r a2r a3r a4r a5r a6r a7r)' \ + '-shrink:shrink factor:' \ + '-S:font shrink density:' \ + '-sidemargin:side margin:' \ + '-topmargin:top margin:' \ + '-xoffset:horizontal offset:' \ + '-yoffset:vertical offset:' \ + '*:DVI file:_files -g \*.\(\#i\)dvi' |