ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] I: zsh completion for hasher and gear
@ 2006-05-11 20:23 Alexey I. Froloff
  2006-05-12  6:17 ` Kirill A. Shutemov
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Alexey I. Froloff @ 2006-05-11 20:23 UTC (permalink / raw)
  To: ALT Devel discussion list


[-- Attachment #1.1: Type: text/plain, Size: 326 bytes --]

"В субботу состоится велосипедный поход для любителей этого дела.
Этого дела брать по бутылке на нос."


$ echo 'fpath=(~/.zsh/functions ~/.zsh/Completion $fpath)' >> ~/.zshenv
$ cp _gear _hasher ~/.zsh/Completion

И радуемся жизни.  Прошу потестить, если устраивает, подвешу в
багзиллу.

-- 
Regards,
Sir Raorn.

[-- Attachment #1.2: _hasher --]
[-- Type: text/plain, Size: 4125 bytes --]

#compdef hsh hsh-install hsh-run hsh-shell

local curcontext="$curcontext" packages common_opts ret=1

__sisyphus_check_tests () {
    local expl tests

    tests=(
	'buildhost'
	'buildtime'
	'changelog'
	'content'
	'deps'
	'description'
	'fhs'
	'gpg'
	'gpgname'
	'group'
	'intersects'
	'libtool'
	'locales'
	'nvr'
	'packager'
	'perms'
	'printable'
	'summary'
    )

    _wanted tests expl test compadd -a "$@" - tests
}

common_opts=(
    '--hasher-priv-dir=[hasher-priv directory]:hasher-priv:_directories'
    '--number=[subconfig identifier]:number'
    '--save-fakeroot[save fakeroot state]'
    '(-v --verbose -q --quiet)'{-q,--quiet}'[try to be more quiet]'
    '(-v --verbose -q --quiet)'{-v,--verbose}'[print a message for each action]'
    '(- :)'{-V,--version}'[print program version and exit]'
    '(- :)'{-h,--help}'[show usage and exit]'
)

case "$service" in
    hsh)
	if (( $words[(I)--(initroot|cleanup)-only] )); then
	    packages=
	else
	    packages='*:package:_files -g "*.(rpm|tar)"'
	fi
	_arguments -S \
	    $common_opts \
	    '--apt-config=[path to custom apt.conf file]:apt-config:_files' \
	    '--apt-prefix=[path to apt directory prefix]:apt-prefix:_directories' \
	    '--build-args=[extra arguments for rpmbuild]:rpmbuild args:' \
	    '(--initroot-only)--cleanup-only[do not build at all, just cleanup workdir]' \
	    '--eager-cleanup[cleanup build environment after each successful build]' \
	    '--lazy-cleanup[cleanup build environment before each new build]' \
	    '--excludedocs[do not install documentation files]' \
	    '(--cleanup-only)--initroot-only[do not build, stop after initroot stage]' \
	    '--install-langs=[colon-separated list of languages to install]:languages' \
	    '--mountpoints=[comma-separated list of known mount points]:mountpoints' \
	    '--no-cache[do not use initroot cache]' \
	    '--no-contents-indices[do not use content indices]' \
	    '(--repackage-source)--no-repackage-source[do not repackage source along with binaries]' \
	    '--no-sisyphus-check-in=[do not run sisyphus_check input tests]::sisyphus_check tests:__sisyphus_check_tests -S, -q' \
	    '--no-sisyphus-check=[do not run sisyphus_check tests]::sisyphus_check tests:__sisyphus_check_tests -S, -q' \
	    '--no-sisyphus-check-out=[do not run sisyphus_check output tests]::sisyphus_check tests:__sisyphus_check_tests -S, -q' \
	    '--nprocs=[number of CPUs to use]:number' \
	    '--pkg-build-list=[override default build package file list]:packages' \
	    '--pkg-init-list=[override default initial package file list]:packages' \
	    '(--query-req-prog)--query-repackage[repackage the source before query for requirements]' \
	    '(--query-repackage)--query-req-prog=[program to run to query for requirements]:query-req-prog:_files' \
	    '(--no-repackage-source)--repackage-source[repackage source along with binaries]' \
	    '--repo=[repository directory]:repository directory' \
	    '--target=[target architecture]:architecture' \
	    '(--with-stuff)--without-stuff[do not use built packages]' \
	    '(--without-stuff)--with-stuff[allow use of built packages]' \
	    ':workdir:_directories' \
	    $packages && ret=0

	;;
    hsh-install)
	_arguments -S \
	    $common_opts \
	    '--excludedocs[do not install documentation files]' \
	    ':workdir:_directories' \
	    '*:package' && ret=0

	;;
    hsh-run|hsh-shell)
	_arguments -S \
	    $common_opts \
	    '--builder[run program as builder]' \
	    '--execute=[copy given script to workdir and execute it]:script:_files' \
	    '--mountpoints=[comma-separated list of known mount points]:mountpoints' \
	    '--pty[redirect standard descriptors to controlling pty]' \
	    '--rooter=[run program as pseudoroot]' \
	    '--shell=[run interactive shell]::shell:_files' \
	    '--x11-timeout=[how long X11 authorization will be valid]:seconds' \
	    '(-x -X -Y)-x[disable X11 forwarding]' \
	    '(-x -X -Y)-X[enable X11 forwarding]' \
	    '(-x -X -Y)-Y[enable trusted X11 forwarding]' \
	    ':workdir:_directories' \
	    '(-):command name: _command_names -e' \
	    '*::arguments: _normal' && ret=0

	;;
esac

[-- Attachment #1.3: _gear --]
[-- Type: text/plain, Size: 1242 bytes --]

#compdef gear

local curcontext="$curcontext" ret=1

_arguments -S \
    '(-v --verbose -q --quiet)'{-q,--quiet}'[try to be more quiet]' \
    '(-v --verbose -q --quiet)'{-v,--verbose}'[print a message for each action]' \
    '(- :)'{-V,--version}'[print program version and exit]' \
    '(- :)'{-h,--help}'[show usage and exit]' \
    '(-r --rules)'{-r,--rules=}'[name of file with rules]:rules file:_files' \
    '(-t --tree-ish)'{-t,--tree-ish=}'[tree, commit or tag object name]:tree-ish' \
    - 'export' \
    '(--export-dir --no-compress --bzip2 --gzip)--no-compress[do not compress output archive]' \
    '(--export-dir --no-compress --bzip2 --gzip)--bzip2[compress output archive using bzip2]' \
    '(--export-dir --no-compress --bzip2 --gzip)--gzip[compress output archive using gzip]' \
    '(--no-compress --bzip2 --gzip :)--export-dir=[write source files to specified directory]:directory:_directories' \
    ':output tarball:_files' \
    - 'hasher' \
    '--hasher[execute hsh-like command afterwards]' \
    '(-):command: _command_names -e' \
    '*::args: _normal' \
    - 'rpmbuld' \
    '--rpmbuild[execute rpmbuild-like command afterwards]' \
    '(-):command: _command_names -e' \
    '*::args: _normal' \
    && ret=0


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2008-03-22 16:56 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 20:23 [devel] I: zsh completion for hasher and gear Alexey I. Froloff
2006-05-12  6:17 ` Kirill A. Shutemov
2006-05-12 18:39 ` Alexey Tourbin
2006-05-12 20:01   ` Alexey I. Froloff
2006-05-12 20:17     ` Alexey Tourbin
2006-05-12 20:25       ` Alexey I. Froloff
2006-05-12 20:33         ` Alexey Tourbin
2006-05-12 22:40           ` [devel] [JT] " Денис Смирнов
2006-05-12 22:47             ` Alexey Tourbin
2006-05-13 18:23           ` [devel] I: " Alexey I. Froloff
2006-05-13 18:28   ` Alexey I. Froloff
2006-05-13 19:09     ` Sergey Vlasov
2006-05-13 20:04       ` Alexey I. Froloff
2006-06-17 18:45     ` Alexey Tourbin
2006-06-18 10:09       ` Alexey I. Froloff
2006-06-18 10:19         ` Alexey Tourbin
2006-06-18 10:27           ` Alexey I. Froloff
2006-06-18 10:27         ` Sergey Vlasov
2006-06-18 10:49           ` Alexey I. Froloff
2006-06-25  3:55         ` Alexey Tourbin
2006-06-28 20:50           ` Alexey I. Froloff
2008-03-22 13:05 ` Michael Shigorin
2008-03-22 13:29   ` Alexey I. Froloff
2008-03-22 16:56     ` [devel] [JT] " Michael Shigorin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git