about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2006-10-14 18:30:42 +0000
committerClint Adams <clint@users.sourceforge.net>2006-10-14 18:30:42 +0000
commit86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814 (patch)
tree6096d8ea603cd119356d90897c1ea22e89f2a842
parentc5492635d854eb33db8757113cecb6ff34aaf215 (diff)
downloadzsh-86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814.tar.gz
zsh-86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814.tar.xz
zsh-86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814.zip
22875: completion for a2ensite, a2dissite, a2enmod, a2dismod.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Debian/Command/_a2utils24
2 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c0143958..334bd2e52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-14  Clint Adams  <clint@zsh.org>
+
+	* 22875: Completion/Debian/Command/_a2utils: Emmanuel Bouthenot,
+	tweaked: completion for a2ensite, a2dissite, a2enmod, a2dismod.
+
 2006-10-13  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 22873: Larry P. Shrof: Doc/Zsh/expn.yo: typo.
diff --git a/Completion/Debian/Command/_a2utils b/Completion/Debian/Command/_a2utils
new file mode 100644
index 000000000..46126282f
--- /dev/null
+++ b/Completion/Debian/Command/_a2utils
@@ -0,0 +1,24 @@
+#compdef a2ensite a2dissite a2enmod a2dismod
+
+local -a mods
+
+case "$service" in
+    a2ensite)
+	_wanted sites expl sites \
+	  _files -W /etc/apache2/sites-available
+	;;
+    a2dissite)
+	_wanted sites expl sites \
+	  _files -W /etc/apache2/sites-enabled
+	;;
+    a2enmod)
+	mods=( /etc/apache2/mods-available/*.load(N:r:t) )
+	_wanted mods expl mods compadd -a mods
+	;;
+    a2dismod)
+	mods=( /etc/apache2/mods-enabled/*.load(N:r:t) )
+	_wanted mods expl mods compadd -a mods
+	;;
+esac
+
+return 0