zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Cc: Emmanuel Hainry <Emmanuel.Hainry@loria.fr>,
	Emmanuel Beffara <manu@beffara.org>
Subject: PATCH: _rubber
Date: Tue, 12 Jul 2005 08:24:56 -0400	[thread overview]
Message-ID: <20050712122456.GA8278@scowler.net> (raw)

This is completion for rubber, contributed by Emmanuel
Hainry and Emmanuel Beffara.

Index: Completion/Unix/Command/_rubber
===================================================================
RCS file: Completion/Unix/Command/_rubber
diff -N Completion/Unix/Command/_rubber
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_rubber	12 Jul 2005 12:24:44 -0000
@@ -0,0 +1,70 @@
+#compdef rubber rubber-pipe rubber-info
+
+local _rubber_version _rubber_path _rubber_modules
+
+eval $(rubber --version | sed 's/^.* \([^ ]*\): */_rubber_\1=/')
+if [[ ${_rubber_version#0} != $_rubber_version ]]; then
+  _rubber_modules=(
+    $(ls $_rubber_path/rubber/modules | sed -n 's/^\([^_].*\)\.py$/\1/p')
+  )
+else
+  _rubber_modules=(
+    $(ls $_rubber_path/modules | sed -n 's/.rub$//p')
+    $(ls $_rubber_path/rubber/rules/latex | sed -n 's/^\([^_].*\)\.py$/\1/p')
+  )
+fi
+
+_rubber_arguments () {
+    _arguments -s \
+      \*{-c,--command}'=[run the directive CMD before parsing]:command' \
+      \*{-e,--epilogue}'=[run the directive CMD after parsing]:command' \
+      {-z,--gzip}'[compress the final document]' \
+      '(- *)'{-h,--help}'[show help]' \
+      '--into=[go to directory DIR before compiling]:directory:_files -/' \
+      {-l,--landscape}'[change paper orientation (if relevant)]' \
+      {-n,--maxerr}'=[display at most NUM errors]:num' \
+      \*{-m,--module}'=[use module]:module:($_rubber_modules)' \
+      '--only=[only include the specified SOURCES]:sources' \
+      \*{-o,--post}'=[postprocess with module]:postprocessor:($_rubber_modules)' \
+      {-d,--pdf}'[produce PDF output instead of DVI]' \
+      {-p,--ps}'[produce a PostScript document]' \
+      {-q,--quiet}'[suppress messages]' \
+      \*{-r,--read}'[read additional directives from a file]:directives files:_files' \
+      {-s,--short}'[display errors in a compact form]' \
+      \*{-I,--texpath}'=[add DIR to the search path for LaTeX]:tex path:_files -/' \
+      \*{-v,--verbose}'[increase verbosity]' \
+      '--version[print version information and exit]' "$@"
+}
+
+case "$service" in
+  rubber)
+    _rubber_arguments \
+      '--clean[remove produced files instead of compiling]' \
+      {-f,--force}'[force at least one compilation]' \
+      '--inplace[compile the documents from their source directory]' \
+      \*{-W,--warn}'=[report warnings of the given TYPE]:warnings:(all boxes misc refs)' \
+      '*:LaTeX files:_files -g \*.\(tex\|dtx\|lhs\|w\)'
+      return 0
+	;;
+	
+  rubber-pipe)
+    _rubber_arguments \
+      {-k,--keep}'[keep the temporary files after compiling]' \
+      \*{-W,--warn}'=[report warnings of the given TYPE]:warnings:(all boxes misc refs)'
+      return 0
+	;;
+	
+  rubber-info)
+    _rubber_arguments \
+      '--boxes[report overfull and underfull boxes]' \
+      '--check[report errors or warnings default action]' \
+      '--deps[show the target file s dependencies]' \
+      '--errors[show all errors that occured during compilation]' \
+      '--refs[show the list of undefined references]' \
+      '--warnings[show all LaTeX warnings]' \
+      ':LaTeX file:_files -g \*.\(tex\|dtx\|lhs\|w\)'
+      return 0
+  ;;
+esac
+
+return 1


                 reply	other threads:[~2005-07-12 12:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050712122456.GA8278@scowler.net \
    --to=clint@zsh.org \
    --cc=Emmanuel.Hainry@loria.fr \
    --cc=manu@beffara.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).