about summary refs log tree commit diff
path: root/Completion/Debian/Command
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 /Completion/Debian/Command
parentc5492635d854eb33db8757113cecb6ff34aaf215 (diff)
downloadzsh-86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814.tar.gz
zsh-86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814.tar.xz
zsh-86f8a4d8949c67b4cd80ce58d26f8a8f8afb9814.zip
22875: completion for a2ensite, a2dissite, a2enmod, a2dismod.
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r--Completion/Debian/Command/_a2utils24
1 files changed, 24 insertions, 0 deletions
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