Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _rrdtool
- X-seq: zsh-workers 23556
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _rrdtool
- Date: Wed, 13 Jun 2007 11:36:34 -0400
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Might be worth parsing rrdtool help output.
Index: Completion/Unix/Command/_rrdtool
===================================================================
RCS file: Completion/Unix/Command/_rrdtool
diff -N Completion/Unix/Command/_rrdtool
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_rrdtool	13 Jun 2007 15:35:27 -0000
@@ -0,0 +1,23 @@
+#compdef rrdtool
+
+_arguments \
+  ':rrdtool command:(create update updatev graph dump restore
+                   last lastupdate first help info fetch tune
+		   resize xport)' \
+  '*::subcmd:->subcmd' && return 0
+
+case "$state" in
+    (subcmd)
+
+  case "$words[1]" in
+      (help)
+      	_wanted -V 'subcommands' expl 'subcommand' compadd \
+	create update updatev graph dump restore last lastupdate \
+	first help info fetch tune resize xport
+	;;
+      (*)
+    	_files
+    	;;
+  esac
+  ;;
+esac
Messages sorted by:
Reverse Date,
Date,
Thread,
Author