1#compdef a2ensite a2dissite a2enmod a2dismod 2 3local -a mods 4 5case "$service" in 6 a2ensite) 7 _wanted sites expl sites \ 8 _files -W /etc/apache2/sites-available 9 ;; 10 a2dissite) 11 _wanted sites expl sites \ 12 _files -W /etc/apache2/sites-enabled 13 ;; 14 a2enmod) 15 mods=( /etc/apache2/mods-available/*.load(N:r:t) ) 16 _wanted mods expl mods compadd -a mods 17 ;; 18 a2dismod) 19 mods=( /etc/apache2/mods-enabled/*.load(N:r:t) ) 20 _wanted mods expl mods compadd -a mods 21 ;; 22esac 23 24return 0 25