From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19156 invoked from network); 26 Mar 2003 16:45:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Mar 2003 16:45:06 -0000 Received: (qmail 3127 invoked by alias); 26 Mar 2003 16:44:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18390 Received: (qmail 3114 invoked from network); 26 Mar 2003 16:44:54 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 26 Mar 2003 16:44:54 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.4] by sunsite.dk (MessageWall 1.0.8) with SMTP; 26 Mar 2003 16:44:53 -0000 Received: (qmail 24951 invoked from network); 26 Mar 2003 16:44:52 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-10.tower-1.messagelabs.com with SMTP; 26 Mar 2003 16:44:52 -0000 Received: from finches.logica.co.uk ([158.234.142.11]) by iris.logica.co.uk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id QAA22140 for ; Wed, 26 Mar 2003 16:44:51 GMT X-Authentication-Warning: iris.logica.co.uk: Host [158.234.142.11] claimed to be finches.logica.co.uk Received: from finches.logica.co.uk (localhost [127.0.0.1]) by finches.logica.co.uk (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h2QGn5K02633 for ; Wed, 26 Mar 2003 17:49:05 +0100 X-VirusChecked: Checked From: Oliver Kiddle To: Zsh workers Subject: PATCH: xsltproc and prcs completions Date: Wed, 26 Mar 2003 17:49:05 +0100 Message-ID: <2631.1048697345@finches.logica.co.uk> This updates _xmlsoft for the latest version of xsltproc and I made some changes to _prcs mainly to be more consistent with _sccs and to avoid the use of _arguments where _describe does the job. Oliver Index: Completion/Unix/Command/_prcs =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_prcs,v retrieving revision 1.2 diff -u -r1.2 _prcs --- Completion/Unix/Command/_prcs 29 May 2001 17:54:37 -0000 1.2 +++ Completion/Unix/Command/_prcs 26 Mar 2003 16:29:28 -0000 @@ -1,11 +1,17 @@ #compdef prcs +local curcontext="$curcontext" state line subcmds +typeset -A opt_args + # lookup project names in the repository # (this does not handle subprojects) (( $+functions[_prcs_projects] )) || _prcs_projects() { - compadd $@ - ${~opt_args[-R]:-${opt_args[--repository]:-${PRCS_REPOSITORY:-$HOME/PRCS}}}/*(/:t) + local expl + + _wanted prcs-projects expl 'project name' compadd "$@" - \ + ${~opt_args[-R]:-${opt_args[--repository]:-${PRCS_REPOSITORY:-~/PRCS}}}/*(/:t) } # standard options for all subcommands @@ -13,102 +19,96 @@ (( $+functions[_prcs_arguments] )) || _prcs_arguments() { _arguments -s \ - '(-f)--force[resolve interactive queries in some fixed way]' \ - '(--force)-f[resolve interactive queries in some fixed way]' \ - '(-h -H)--help[print out help]' \ - '(--help -H)-h[print out help]' \ - '(--help -h)-H[print out help]' \ - '(-j)--jobs=[spawn many child processes at once]:number:' \ - '(--jobs)-j[spawn many child processes at once]:number:' \ - '(-l)--long-format[long format]' \ - '(--long-format)-l[long format]' \ - '(-L)--long-long-format[long format]' \ - '(--long-long-format)-L[longer format]' \ - '(-n)--no-action[no action]' \ - '(--no-action)-n[no action]' \ - '(-q)--quiet[suppress normal informational messages]' \ - '(--quiet)-q[suppress normal informational messages]' \ + '(-f --force)'{-f,--force}'[resolve interactive queries in some fixed way]' \ + '(-h -H --help)'{-h,-H,--help}'[print out help]' \ + '(-j --jobs)'{-j,--jobs=}'[spawn many child processes at once]:number:' \ + '(-l -L --long-format --long-long-format)'{-l,--long-format}'[long format]' \ + '(-l -L --long-format --long-long-format)'{-L,--long-long-format}'[longer format]' \ + '(-n --no-action)--no-action[show what would happen but leave files unchanged]' \ + '(-q --quiet)'{-q,--quiet}'[suppress normal informational messages]' \ "--plain-format[don't break lines at screen width]" \ - '(-R)--repository=[set the repository directory]:directory:_files -/' \ - '(--repository)-R[set the repository directory]:directory:_files -/' \ - '(-v)--version[print PRCS version and exits]' \ - '(--version)-v[print PRCS version and exits]' \ - $@ + '(-R --repository)'{-R,--repository=}'[specify the repository directory]:directory:_files -/' \ + "$@" } -if (( CURRENT == 2 )); then - _arguments \ - ':prcs command:(( - admin\:"admin subcommand" - checkin\:"checkin project revision" - checkout\:"checkout project revision" - config\:"verify configuration" - delete\:"delete named revision of project" - depopulate\:"remove named files from project descriptor" - diff\:"show differences between two revisions" - execute\:"execute a command for each file in a project" - info\:"print information about versions of project" - merge\:"reconcile differences between working files and another revision" - package\:"package the project and all its revisions into packagefile" - populate\:"add named files to project descriptor" - rekey\:"set keywords in selected files" - unpackage\:"unpackage project in packagefile"))' -else - shift words - (( --CURRENT )) - case "$words[1]" in +_arguments -C \ + '(* -)'{-h,-H,--help}'[print out help]' \ + '(* -)--version[display program version]' \ + '*:: :->subcmd' && return 0 + +if (( CURRENT == 1 )); then + subcmds=( + 'admin:admin subcommand' + 'checkin:checkin project revision' + 'checkout:checkout project revision' + 'config:verify configuration' + 'delete:delete named revision of project' + 'depopulate:remove named files from project descriptor' + 'diff:show differences between two revisions' + 'execute:execute a command for each file in a project' + 'info:print information about versions of project' + 'merge:reconcile differences between working files and another revision' + 'package:package the project and all its revisions into packagefile' + 'populate:add named files to project descriptor' + 'rekey:set keywords in selected files' + 'unpackage:unpackage project in packagefile' + ) + + _describe -t commands 'prcs command' subcmds + return +fi + +curcontext="${curcontext%:*}-$words[1]:" + +case "$words[1]" in admin) if (( CURRENT == 2 )); then - _arguments \ - ':admin subcommand:(( - access\:"set the access permissions on the repository" - compress\:"instruct PRCS to save disk space for project" - init\:"create a repository entry" - pdelete\:"delete a repository entry" - pinfo\:"list all projects in the repository" - prename\:"rename a repository entry" - rebuild\:"reconstruct PRCS data files in the repository" - uncompress\:"instruct PRCS to save time in processing project"))' + subcmds=( + 'access:set the access permissions on the repository' + 'compress:instruct PRCS to save disk space for project' + 'init:create a repository entry' + 'pdelete:delete a repository entry' + 'pinfo:list all projects in the repository' + 'prename:rename a repository entry' + 'rebuild:reconstruct PRCS data files in the repository' + 'uncompress:instruct PRCS to save time in processing project' + ) + _describe -t commands 'admin subcommand' subcmds else shift words (( --CURRENT )) + curcontext="${curcontext%:*}-$words[1]:" case "$words[1]" in - access|compress|init|pdelete|prename|rebuild) - _prcs_arguments ':project name:_prcs_projects' + access|compress|init|pdelete|prename|rebuild) + _prcs_arguments ':project name:_prcs_projects' ;; - pinfo) - _prcs_arguments + pinfo) + _prcs_arguments ;; - uncompress) - _prcs_arguments \ - '-i[expand the entire project immediately]' \ - ':project name:_prcs_projects' + uncompress) + _prcs_arguments \ + '-i[expand the entire project immediately]' \ + ':project name:_prcs_projects' ;; - *) - _message "unknown prcs administrative subfunction: $words[1]" + *) + _message "unknown prcs administrative subfunction: $words[1]" ;; esac fi ;; checkin) _prcs_arguments \ - '(-r)--revision=[version of the project]:revision:' \ - '(--revision)-r[version of the project]:revision:' \ - '(-s)--skilled-merge[turn off most of the safety features of merge]' \ - '(--skilled-merge)-s[turn off most of the safety features of merge]' \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ + '(-s --skilled-merge)'{-s,--skilled-merge}'[turn off most of the safety features of merge]' \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; checkout) _prcs_arguments \ - '(-r)--revision=[version of the project]:revision:' \ - '(--revision)-r[version of the project]:revision:' \ - '(-p)--preserve[preserve permissions on files that are checked out]' \ - '(--preserve)-p[preserve permissions on files that are checked out]' \ - "(-u)--unlink[don't overwrite symbolic link references]" \ - "(--unlink)-u[don't overwrite symbolic link references]" \ - "(-P)--exclude-project-file[don't checkout the project file]" \ - "(--exclude-project-file)-P[don't checkout the project file]" \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ + '(-p --preserve)'{-p,--preserve}'[preserve permissions on files that are checked out]' \ + '(-u --unlink)'{-u,--unlink}"[don't overwrite symbolic link references]" \ + '(-P --exclude-project-file)'{-P,--exclude-project-file}"[don't checkout the project file]" \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; @@ -117,8 +117,7 @@ ;; delete) _prcs_arguments \ - '(-r)--revision=[version of the project]:reversion:' \ - '(--revision)-r[version of the project]:reversion:' \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ ':project name:_prcs_projects' ;; depopulate) @@ -128,70 +127,57 @@ ;; diff) _prcs_arguments \ - '*--revision=[version of the project]:revision:' \ - '*-r[version of the project]:revision:' \ - '(-k)--keywords[compare keywords too]' \ - '(--keywords)-k[compare keywords too]' \ - '(-N)--new[compare new files against empty files]' \ - '(--new)-N[compare new files against empty files]' \ - "(-P)--exclude-project-file[don't diff the project file]" \ - "(--exclude-project-file)-P[don't diff the project file]" \ + '*'{-r+,--revision=}'[specify version of the project]:revision:' \ + '(-k --keywords)'{-k,--keywords}'[compare keywords too]' \ + '(-N --new)'{-N,--new}'[compare new files against empty files]' \ + '(-P --exclude-project-file)'{-P,--exclude-project-file}"[don't diff the project file]" \ '--[introduce diff options]:*::diff options:= _diff_options ${PRCS_DIFF_COMMAND:-diff}' \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; execute) - _prcs_arguments \ - '(-r)--revision=[version of the project]:reversion:' \ - '(--revision)-r[version of the project]:reversion:' \ - '--pre[list directories first]' \ - '(--pipe)--all[execute command once, with all files as arguments]' \ - '(--all)--pipe[supply file contents as the standard input]' \ - '--match[execute command on files matching a pattern]:pattern:' \ - '--not[execute command on files not matching a pattern]:pattern:' \ - '--:command: _command_names -e:*::arguments: _normal' \ - ':project name:_prcs_projects' \ - '*:file or directory:_files' + _prcs_arguments \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ + '--pre[list directories first]' \ + '(--pipe)--all[execute command once, with all files as arguments]' \ + '(--all)--pipe[supply file contents as the standard input]' \ + '--match[execute command on files matching a pattern]:pattern:' \ + '--not[execute command on files not matching a pattern]:pattern:' \ + '--:command: _command_names -e:*::arguments: _normal' \ + ':project name:_prcs_projects' \ + '*:file or directory:_files' ;; info) _prcs_arguments \ - '(-r)--revision=[version of the project]:revision:' \ - '(--revision)-r[version of the project]:revision:' \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ '--sort=[set sorting type]:sorting type:(version date)' \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; merge) _prcs_arguments \ - '(-r)--revision=[version of the project]:revision:' \ - '(--revision)-r[version of the project]:revision:' \ - '(-s)--skilled-merge[turn off most of the safety features of merge]' \ - '(--skilled-merge)-s[turn off most of the safety features of merge]' \ - "(-u)--unlink[don't overwrite symbolic link references]" \ - "(--unlink)-u[don't overwrite symbolic link references]" \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ + '(-s --skilled-merge)'{-s,--skilled-merge}'[turn off most of the safety features of merge]' \ + '(-u --unlink)'{-u,--unlink}"[don't overwrite symbolic link references]" \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; package) _prcs_arguments \ - '(-r)--revision=[version of the project]:revision:' \ - '(--revision)-r[version of the project]:revision:' \ - '(-z)--compress=[compress the output]' \ - '(--compress)-z[compress the output]' \ + '(-r --revision)'{-r+,--revision=}'[specify version of the project]:revision:' \ + '(-z --compress)'{-z,--compress=}'[compress the output]' \ ':project name:_prcs_projects' \ ':file:_files' ;; populate) _prcs_arguments \ - '(-d)--delete=[perform optional deletions]' \ - '(--delete)-d[perform optional deletions]' \ + '(-d --delete)'{-d,--delete=}'[perform optional deletions]' \ ':project name:_prcs_projects' \ '*:file or directory:_files' ;; rekey) _prcs_arguments \ - "(-u)--unlink[don't overwrite symbolic link references]" \ - "(--unlink)-u[don't overwrite symbolic link references]" \ + '(-u --unlink)'{-u,--unlink}"[don't overwrite symbolic link references]" \ ':project name:_prcs_projects' ;; unpackage) @@ -202,5 +188,4 @@ *) _message "unknown prcs command: $words[1]" ;; - esac -fi +esac Index: Completion/Unix/Command/_xmlsoft =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_xmlsoft,v retrieving revision 1.3 diff -u -r1.3 _xmlsoft --- Completion/Unix/Command/_xmlsoft 18 Mar 2003 06:00:13 -0000 1.3 +++ Completion/Unix/Command/_xmlsoft 26 Mar 2003 16:29:28 -0000 @@ -1,7 +1,7 @@ #compdef xsltproc xmllint # xmllint: using libxml version 20503 -# xsltproc: using libxslt version 10021 +# xsltproc: using libxslt version 10027 case $service in xsltproc) @@ -20,7 +20,11 @@ '(--html)--docbook[input document is SGML docbook]' \ '--param[pass a parameter,value pair]:name::value (xpath expression)' \ '--stringparam[pass a parameter]:name::value' \ + '--path[provide a set of paths for resources]:paths:_files -/' \ '--nonet[refuse to fetch DTDs or entities over network]' \ + '--nowrite[refuse to write to any file or resource]' \ + '--nomkdir[refuse to create directories]' \ + '--writesubtree[allow file write only with the path subtree]:path:_files -/' \ '--catalogs[use SGML catalogs]' \ '--xinclude[do XInclude processing on document input]' \ {--profile,--norman}'[dump profiling information]' \