_a2utils 499 B

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