mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-16 12:21:18 +02:00
Initial revision
This commit is contained in:
parent
d335ab27a7
commit
c8236cdb49
22 changed files with 236 additions and 0 deletions
15
Completion/Rpm/_rpm
Normal file
15
Completion/Rpm/_rpm
Normal file
|
@ -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'
|
8
Completion/Rpm/_rpm_arguments
Normal file
8
Completion/Rpm/_rpm_arguments
Normal file
|
@ -0,0 +1,8 @@
|
|||
#autoload
|
||||
|
||||
_arguments \
|
||||
-{v,vv} \
|
||||
'-rcfile:resource file:_files' \
|
||||
'--ftpproxy:FTP proxy server:_hosts' \
|
||||
'--ftpport:FTP port number:' \
|
||||
"$@"
|
16
Completion/Rpm/_rpm_build
Normal file
16
Completion/Rpm/_rpm_build
Normal file
|
@ -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"
|
3
Completion/Rpm/_rpm_capability
Normal file
3
Completion/Rpm/_rpm_capability
Normal file
|
@ -0,0 +1,3 @@
|
|||
#autoload
|
||||
|
||||
_message 'RPM capability'
|
10
Completion/Rpm/_rpm_install
Normal file
10
Completion/Rpm/_rpm_install
Normal file
|
@ -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'
|
6
Completion/Rpm/_rpm_package
Normal file
6
Completion/Rpm/_rpm_package
Normal file
|
@ -0,0 +1,6 @@
|
|||
#autoload
|
||||
|
||||
local expl
|
||||
|
||||
_description expl 'RPM package'
|
||||
compadd "$expl[@]" -M 'r:|-=* r:|=*' - $(rpm -qa)
|
7
Completion/Rpm/_rpm_pkg_file
Normal file
7
Completion/Rpm/_rpm_pkg_file
Normal file
|
@ -0,0 +1,7 @@
|
|||
#autoload
|
||||
|
||||
if compset -P ftp:; then
|
||||
_hosts -S/
|
||||
else
|
||||
_files -g '*.(#i)rpm'
|
||||
fi
|
8
Completion/Rpm/_rpm_pkg_or_file
Normal file
8
Completion/Rpm/_rpm_pkg_or_file
Normal file
|
@ -0,0 +1,8 @@
|
|||
#autoload
|
||||
|
||||
local ret=1
|
||||
|
||||
_rpm_package && ret=0
|
||||
_rpm_pkg_file && ret=0
|
||||
|
||||
return ret
|
12
Completion/Rpm/_rpm_query
Normal file
12
Completion/Rpm/_rpm_query
Normal file
|
@ -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'
|
6
Completion/Rpm/_rpm_rebuild
Normal file
6
Completion/Rpm/_rpm_rebuild
Normal file
|
@ -0,0 +1,6 @@
|
|||
#autoload
|
||||
|
||||
_rpm_arguments \
|
||||
'--root:RPM root directory:_files -/' \
|
||||
'--dbpath:RPM database path:_files -/' \
|
||||
'*:RPM source package file:_rpm_pkg_file'
|
3
Completion/Rpm/_rpm_rebuilddb
Normal file
3
Completion/Rpm/_rpm_rebuilddb
Normal file
|
@ -0,0 +1,3 @@
|
|||
#autoload
|
||||
|
||||
_rpm_arguments
|
11
Completion/Rpm/_rpm_relocate
Normal file
11
Completion/Rpm/_rpm_relocate
Normal file
|
@ -0,0 +1,11 @@
|
|||
#autoload
|
||||
|
||||
local expl
|
||||
|
||||
if compset -P '*\='; then
|
||||
_description expl 'new path'
|
||||
else
|
||||
_description expl 'old path'
|
||||
fi
|
||||
|
||||
_files "$expl[@]" -/
|
4
Completion/Rpm/_rpm_resign
Normal file
4
Completion/Rpm/_rpm_resign
Normal file
|
@ -0,0 +1,4 @@
|
|||
#autoload
|
||||
|
||||
_rpm_arguments \
|
||||
'*:RPM binary package file:_rpm_pkg_file'
|
5
Completion/Rpm/_rpm_sigcheck
Normal file
5
Completion/Rpm/_rpm_sigcheck
Normal file
|
@ -0,0 +1,5 @@
|
|||
#autoload
|
||||
|
||||
_rpm_arguments \
|
||||
--no{pgp,md5} \
|
||||
'*:RPM package file:_rpm_pkg_or_file'
|
11
Completion/Rpm/_rpm_tags
Normal file
11
Completion/Rpm/_rpm_tags
Normal file
|
@ -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
|
7
Completion/Rpm/_rpm_uninstall
Normal file
7
Completion/Rpm/_rpm_uninstall
Normal file
|
@ -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'
|
3
Completion/Rpm/_rpm_upgrade
Normal file
3
Completion/Rpm/_rpm_upgrade
Normal file
|
@ -0,0 +1,3 @@
|
|||
#autoload
|
||||
|
||||
_rpm_install --oldpackage
|
7
Completion/Rpm/_rpm_verify
Normal file
7
Completion/Rpm/_rpm_verify
Normal file
|
@ -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'
|
19
Completion/User/_gs
Normal file
19
Completion/User/_gs
Normal file
|
@ -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
|
31
Completion/User/_gs_name
Normal file
31
Completion/User/_gs_name
Normal file
|
@ -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
|
14
Completion/X/_gv
Normal file
14
Completion/X/_gv
Normal file
|
@ -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'
|
30
Completion/X/_xdvi
Normal file
30
Completion/X/_xdvi
Normal file
|
@ -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'
|
Loading…
Reference in a new issue