* PATCH: _rrdtool
@ 2007-06-13 15:36 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2007-06-13 15:36 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-13 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-13 15:36 PATCH: _rrdtool Clint Adams
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).