summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_rubber70
1 files changed, 70 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_rubber b/Completion/Unix/Command/_rubber
new file mode 100644
index 000000000..cf7199fde
--- /dev/null
+++ b/Completion/Unix/Command/_rubber
@@ -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' \