about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-05-07 03:36:24 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-05-07 03:36:24 +0000
commitd362d4c010640b7e10fe5f7bf0724fcc663242e9 (patch)
tree2652d21dc2138f67abd3a37ebf0dad89c8810ef4 /Completion/Unix
parent946c3401f8d282b82ec2c90fe662a3d508b10f30 (diff)
downloadzsh-d362d4c010640b7e10fe5f7bf0724fcc663242e9.tar.gz
zsh-d362d4c010640b7e10fe5f7bf0724fcc663242e9.tar.xz
zsh-d362d4c010640b7e10fe5f7bf0724fcc663242e9.zip
Merge of workers/{21447,2150[57]}.
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_rubber72
1 files changed, 72 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_rubber b/Completion/Unix/Command/_rubber
new file mode 100644
index 000000000..611425636
--- /dev/null
+++ b/Completion/Unix/Command/_rubber
@@ -0,0 +1,72 @@
+#compdef rubber rubber-pipe rubber-info
+
+local _rubber_version _rubber_path _rubber_modules _rubber_args
+
+eval $(rubber --version | sed 's/^.* \([^ ]*\): */_rubber_\1=/')
+if [[ ${_rubber_version#0} != $_rubber_version ]]; then
+  _rubber_modules=(
+    $_rubber_path/rubber/modules/[^_]*.py(N:r:t)
+  )
+else
+  _rubber_modules=(
+    $_rubber_path/modules/*.rub(N:r:t)
+    $_rubber_path/rubber/rules/latex/[^_]*.py(N:r:t)
+  )
+fi
+
+_rubber_args=(
+      \*{-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)
+    _arguments -s \
+      "$_rubber_args[@]" \
+      '--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)
+    _arguments -s \
+      "$_rubber_args[@]" \
+      {-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)
+    _arguments -s \
+      "$_rubber_args[@]" \
+      '--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