about summary refs log tree commit diff
path: root/Completion/Debian/Command
diff options
context:
space:
mode:
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