mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-24 05:11:08 +02:00
import dchroot, dlocate, dpkg-cross, madison, piuparts, toolchain-source,
bzr, cplay, date, quilt, urvt from HEAD
This commit is contained in:
parent
d7db8f21d1
commit
59e1574eaa
12 changed files with 267 additions and 0 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2005-11-25 Clint Adams <clint@zsh.org>
|
||||
|
||||
* unposted: Completion/Debian/Command/_dchroot,
|
||||
Completion/Debian/Command/_dlocate,
|
||||
Completion/Debian/Command/_dpkg-cross,
|
||||
Completion/Debian/Command/_madison,
|
||||
Completion/Debian/Command/_piuparts,
|
||||
Completion/Debian/Command/_toolchain-source,
|
||||
Completion/Unix/Command/_bzr, Completion/Unix/Command/_cplay,
|
||||
Completion/Unix/Command/_date, Completion/Unix/Command/_quilt,
|
||||
Completion/X/Command/_urxvt: import various completion functions
|
||||
from main branch.
|
||||
|
||||
2005-11-25 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 22031: Nikolai Weibull: Completion/Unix/Command/_git: new
|
||||
|
|
18
Completion/Debian/Command/_dchroot
Normal file
18
Completion/Debian/Command/_dchroot
Normal file
|
@ -0,0 +1,18 @@
|
|||
#compdef dchroot
|
||||
|
||||
local curcontext="$curcontext" state line expl ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(-c -l -h -V)-a[execute in all known chroots]' \
|
||||
'(-a -l -h -V)-c[execute in specified chroot]:chroot:->chroots' \
|
||||
'(- *)-l[list available chroots]' \
|
||||
'(-l)-d[preserve environment in chroot]' \
|
||||
'(-h -l -V)-q[be quiet]' \
|
||||
'(- *)-h[display help information]' \
|
||||
'(- *)-V[display version information]' \
|
||||
'*::args: _normal' && ret=0
|
||||
|
||||
[[ -n $state ]] && _wanted chroots expl chroot \
|
||||
compadd ${${$(dchroot -l)[3,-1]%,}:#\[*\]} && ret=0
|
||||
|
||||
return ret
|
31
Completion/Debian/Command/_dlocate
Normal file
31
Completion/Debian/Command/_dlocate
Normal file
|
@ -0,0 +1,31 @@
|
|||
#compdef dlocate
|
||||
|
||||
local context state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments \
|
||||
'-h[help]' \
|
||||
'-S[match strings only]' \
|
||||
'-L[list all files in package]' \
|
||||
'-l[almost-emulation of dpkg -l]' \
|
||||
'-s[print status of package]' \
|
||||
'-ls[ls -ldF of all files in package]' \
|
||||
'-du[du -sck of all files in package]' \
|
||||
'-conf[list conffiles in package]' \
|
||||
'-lsconf[ls -ldF of conffiles in package]' \
|
||||
'-md5sum[list md5sums (if any) of package]' \
|
||||
'-md5check[check md5sums (if any) of package]' \
|
||||
'-man[list man pages (if any) of package]' \
|
||||
':arg:->stringorpkg' && return 0
|
||||
|
||||
case "$state" in
|
||||
(stringorpkg)
|
||||
if (( $+opt_args[-S] )); then
|
||||
_files
|
||||
else
|
||||
_alternative \
|
||||
'string:search string:_files' \
|
||||
'package:Debian packages:_deb_packages installed'
|
||||
fi
|
||||
;;
|
||||
esac
|
22
Completion/Debian/Command/_dpkg-cross
Normal file
22
Completion/Debian/Command/_dpkg-cross
Normal file
|
@ -0,0 +1,22 @@
|
|||
#compdef dpkg-cross
|
||||
|
||||
local _dpkgcross_arches
|
||||
|
||||
_dpkgcross_arches=(/etc/dpkg-cross/cross-config.*(N))
|
||||
_dpkgcross_arches=(${${_dpkgcross_arches#*.}:-alpha amd64 common cygwin-i386 gnu hppa i386 linux m32r m68k mips powerpc sh sh3 sh3eb sh4 sh4eb w32})
|
||||
|
||||
_arguments \
|
||||
'(-h --help)'{-h,--help}'[show summary of options]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[be more verbose]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[be more quiet]' \
|
||||
'(-a --arch)'{-a,--arch}':architecture:('"$_dpkgcross_arches"')' \
|
||||
'(-i --install)'{-i,--install}'[install packages]' \
|
||||
'(-A --convert-anyway)'{-A,--convert-anyway}'[convert package even if not useful]' \
|
||||
'(-b --build)'{-b,--build}'[just build but do not install]' \
|
||||
'(-r --remove)'{-r,--remove}'[remove packages]' \
|
||||
'(-s --status)'{-s,--status}'[print status of named packages]' \
|
||||
'(-l --list)'{-l,--list}'[print short status of named packages or patterns]' \
|
||||
'(-L --list-files)'{-L,--list-files}'[list files belonging to named packages]' \
|
||||
'(-u --update)'{-u,--update}'[update current cross-inst]' \
|
||||
'(-Q --query)'{-Q,--query}'[print available update packages]' \
|
||||
'*:package or path or pattern:_files'
|
14
Completion/Debian/Command/_madison
Normal file
14
Completion/Debian/Command/_madison
Normal file
|
@ -0,0 +1,14 @@
|
|||
#compdef madison
|
||||
|
||||
_arguments \
|
||||
'(-a --architecture)'{-a,--architecture=}':arch:_values -s , "architecture list" source all alpha arm hppa hurd-i386 i386 ia64 mips mipsel' \
|
||||
'(-b --binary)'{-b,--binary-type=}':type:(deb udeb)' \
|
||||
'(-c --component)'{-c,--component=}':component:_values -s , "component list" main contrib non-free' \
|
||||
'(-g --greaterorequal)'{-g,--greaterorequal} \
|
||||
'(-G --greaterthan)'{-G,--greaterthan} \
|
||||
'(-h --help)'{-h,--help} \
|
||||
'(-r --regex)'{-r,--regex} \
|
||||
'(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable' \
|
||||
'(-S, --source-and-binary)'{-S,--source-and-binary} \
|
||||
'*:package:_deb_packages avail'
|
||||
|
30
Completion/Debian/Command/_piuparts
Normal file
30
Completion/Debian/Command/_piuparts
Normal file
|
@ -0,0 +1,30 @@
|
|||
#compdef piuparts
|
||||
|
||||
local context state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -s \
|
||||
'(-a --apt)'{-a,--apt} \
|
||||
'(-b --basetgz)'{-b,--basetgz=}':base tarball:_files' \
|
||||
'(-d --distribution)'{-d,--distribution=}':Debian distribution:(sarge etch sid experimental)' \
|
||||
'(-i --ignore)*'{-i,--ignore=}':file to ignore:_files' \
|
||||
'(-I --ignore-regexp)*'{-I,--ignore-regexp=}':expression to ignore' \
|
||||
'(-k --keep-tmpdir)'{-k,--keep-tmpdir} \
|
||||
'(-l --log-file)'{-l,--logfile=}':log file:_files' \
|
||||
'(-m --mirror)'{-m,--mirror=}':Debian mirror:_urls' \
|
||||
'(-n --no-ignores)'{-n,--no-ignores} \
|
||||
'(-p --pbuilder)'{-p,--pbuilder}'[use /var/cache/pbuilder/base.tgz]' \
|
||||
'(-s --save)'{-s,--save=}':target tarball:_files' \
|
||||
'(-t --tmpdir)'{-t,--tmpdir=}':temp dir:_files -/' \
|
||||
'-V[version]' \
|
||||
'*:package:->packages' && return 0
|
||||
|
||||
case "$state" in
|
||||
(packages)
|
||||
if (( $+opt_args[-a] )); then
|
||||
_deb_packages avail
|
||||
else
|
||||
_files -g '*.deb'
|
||||
fi
|
||||
;;
|
||||
esac
|
9
Completion/Debian/Command/_toolchain-source
Normal file
9
Completion/Debian/Command/_toolchain-source
Normal file
|
@ -0,0 +1,9 @@
|
|||
#compdef tpkg-install tpkg-make tpkg-debarch tpkg-update tpkg-install-libc
|
||||
|
||||
local expl
|
||||
|
||||
(( CURRENT == 2 )) &&
|
||||
_wanted target expl 'target platform' \
|
||||
compadd alpha-linux arm-linux hppa-linux i{3..6}86-linux ia32-linux ia64-linux m68k-linux \
|
||||
mipsel-linux mips-linux ppc-linux powerpc-linux sparc-linux s390-linux
|
||||
|
13
Completion/Unix/Command/_bzr
Normal file
13
Completion/Unix/Command/_bzr
Normal file
|
@ -0,0 +1,13 @@
|
|||
#compdef bzr
|
||||
|
||||
local _bzr_subcommands expl curcontext="$curcontext"
|
||||
|
||||
_bzr_subcommands=(${(f)"$(_call_program bzr bzr shell-complete)"})
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_describe -t subcommand 'subcommand' _bzr_subcommands
|
||||
else
|
||||
# this part should call bzr shell-complete <subcmd> when
|
||||
# it has been tweaked properly
|
||||
_files
|
||||
fi
|
8
Completion/Unix/Command/_cplay
Normal file
8
Completion/Unix/Command/_cplay
Normal file
|
@ -0,0 +1,8 @@
|
|||
#compdef cplay
|
||||
|
||||
_arguments -s \
|
||||
'-n[enable restricted mode]' \
|
||||
'-r[toggle playlist repeat mode]' \
|
||||
'-R[toggle playlist random mode]' \
|
||||
'-v[toggle PCM and MASTER volume control]' \
|
||||
'*:playlist or directory or audio file:_files'
|
48
Completion/Unix/Command/_date
Normal file
48
Completion/Unix/Command/_date
Normal file
|
@ -0,0 +1,48 @@
|
|||
#compdef date
|
||||
|
||||
if _pick_variant -r is_gnu gnu="Free Software Foundation" unix --version; then
|
||||
_arguments \
|
||||
'-d[date]:time string:' \
|
||||
'-f[file]:date file:_files' \
|
||||
'-I[iso-8601]:time spec:' \
|
||||
'-r[reference]:file:_files' \
|
||||
'-R[rfc-2822]' \
|
||||
'-s[set]:time string:' \
|
||||
'-u[utc]' \
|
||||
-- \
|
||||
'*=FILE*:file:_files' \
|
||||
'*=DATEFILE*:date file:_files' \
|
||||
':format or date:'
|
||||
else
|
||||
case "$OSTYPE" in
|
||||
(solaris*)
|
||||
_arguments \
|
||||
'-u[utc]' \
|
||||
'-a:adjustment:' \
|
||||
':format or date:'
|
||||
;;
|
||||
(freebsd*)
|
||||
_arguments \
|
||||
'-u[utc]' \
|
||||
'-n[only set time on current machine]' \
|
||||
'-d:daylight savingg time value:' \
|
||||
'-j[do not try to set date]' \
|
||||
'-f:parsing format:' \
|
||||
'-r:seconds since epoch:' \
|
||||
'-t:minutes west of GMT:' \
|
||||
'-v:adjustment value:' \
|
||||
':format or date:'
|
||||
;;
|
||||
(openbsd*)
|
||||
_arguments \
|
||||
'-u[utc]' \
|
||||
'-n[only set time on current machine]' \
|
||||
'-d:daylight savingg time value:' \
|
||||
'-a[gradually skew]' \
|
||||
'-r:seconds since epoch:' \
|
||||
'-t:minutes west of GMT:' \
|
||||
':format or date:'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
22
Completion/Unix/Command/_quilt
Normal file
22
Completion/Unix/Command/_quilt
Normal file
|
@ -0,0 +1,22 @@
|
|||
#compdef quilt
|
||||
|
||||
local _quilt_subcommands expl curcontext="$curcontext"
|
||||
|
||||
_arguments \
|
||||
'--trace' \
|
||||
'--quiltrc:config file:_files' \
|
||||
'--version' \
|
||||
'*::quilt command:->subcmd' && return 0
|
||||
|
||||
|
||||
_quilt_subcommands=(add files import previous setup annotate fold mail
|
||||
push snapshot applied fork new refresh top delete graph next remove
|
||||
unapplied diff grep patches rename upgrade edit header pop series)
|
||||
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t subcommand 'subcommand' _quilt_subcommands
|
||||
else
|
||||
# this part should be tailored for subcmds
|
||||
_files
|
||||
fi
|
39
Completion/X/Command/_urxvt
Normal file
39
Completion/X/Command/_urxvt
Normal file
|
@ -0,0 +1,39 @@
|
|||
#compdef urxvt
|
||||
|
||||
_x_arguments \
|
||||
-+{rv,ls,j,ptab,sb,sr,st,si,sk,sw,ip,ipf,ut,vb,tcw,insecure,uc,bc,pb,bl,ssc,ssr} \
|
||||
'-tn:terminal type:' \
|
||||
'-C[intercept console messages]' \
|
||||
'-iconic[start iconic]' \
|
||||
'-sbt[scroll bar thickness]:pixels:' \
|
||||
'-tint[tint color]:color:_x_color' \
|
||||
'-fade[make colors darker when losing focus]:percentage:' \
|
||||
'-sh[shade background when tinting]:percentage:' \
|
||||
'-bg:background color:_x_color' \
|
||||
'-fg:foreground color:_x_color' \
|
||||
'-cr:cursor color:_x_color' \
|
||||
'-pr:pointer color:_x_color' \
|
||||
'-pr2:pointer background color:_x_color' \
|
||||
'-bd:border color:_x_color' \
|
||||
'-pixmap:pixmap:_files' \
|
||||
'-fn:normal font:_x_font' \
|
||||
'-fb:bold font:_x_font' \
|
||||
'-fi:italic font:_x_font' \
|
||||
'-fbi:bold italic font:_x_font' \
|
||||
'-im:input method:(SCIM)' \
|
||||
'-pt:input style:(OverTheSpot OffTheSpot Root)' \
|
||||
'-imlocale:locale input method:_locales' \
|
||||
'-imfont:fontset for styles OverTheSpot and OffTheSpot:_x_font' \
|
||||
'-name:client instance, icon, and title strings:' \
|
||||
'-title:title name for window:' \
|
||||
'-n:icon name for window:' \
|
||||
'-sl:save lines:' \
|
||||
'-embed:window id to embed terminal in:_x_window' \
|
||||
'-pty-fd:file descriptor of pty to use:' \
|
||||
'-w:external border in pixels:' \
|
||||
'-b:internal border in pixels:' \
|
||||
'-lsp:number of extra pixels between rows:' \
|
||||
'-mod:meta modifier:_x_modifier' \
|
||||
'-e:program: _command_names -e:*::program arguments: _normal' \
|
||||
'-help[print help]' \
|
||||
'--help[list long options]'
|
Loading…
Reference in a new issue