Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _lighttpd



Completion for lighty-{enable,disable}-mod from Chris Lamb:

Index: Completion/Debian/Command/_lighttpd
===================================================================
RCS file: Completion/Debian/Command/_lighttpd
diff -N Completion/Debian/Command/_lighttpd
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Debian/Command/_lighttpd	30 Aug 2007 22:50:49 -0000
@@ -0,0 +1,16 @@
+#compdef lighty-enable-mod lighty-disable-mod
+
+local -a mods
+
+case "$service" in
+    lighty-enable-mod)
+		mods=( `echo /etc/lighttpd/conf-available/*.conf(N:r:t) | sed -e 's/\b[0-9][0-9]-//g'` )
+		_wanted mods expl mods compadd -a mods
+	;;
+    lighty-disable-mod)
+		mods=( `echo /etc/lighttpd/conf-enabled/*.conf(N:r:t) | sed -e 's/\b[0-9][0-9]-//g'` )
+		_wanted mods expl mods compadd -a mods
+	;;
+esac
+
+return 0



Messages sorted by: Reverse Date, Date, Thread, Author