Add completions for Debian's Apache tools, a2{en,dis}{mod,conf,site}

Work on #2141.
This commit is contained in:
David Adam 2015-06-26 16:14:01 +08:00
parent 6ec58a20c0
commit 976ce1e8fd
9 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,5 @@
complete -c a2disconf -s q -l quiet -d "Don't show informative messages"
complete -c a2disconf -s p -l purge -d "Purge all traces of module"
complete -c a2disconf -xa '(__fish_print_debian_apache_confs)'

View file

@ -0,0 +1,5 @@
complete -c a2dismod -s q -l quiet -d "Don't show informative messages"
complete -c a2dismod -s p -l purge -d "Purge all traces of module"
complete -c a2dismod -xa '(__fish_print_debian_apache_mods)'

View file

@ -0,0 +1,5 @@
complete -c a2dissite -s q -l quiet -d "Don't show informative messages"
complete -c a2dissite -s p -l purge -d "Purge all traces of module"
complete -c a2dissite -xa '(__fish_print_debian_apache_sites)'

View file

@ -0,0 +1,4 @@
complete -c a2enconf -s q -l quiet -d "Don't show informative messages"
complete -c a2enconf -xa '(__fish_print_debian_apache_confs)'

View file

@ -0,0 +1,4 @@
complete -c a2enmod -s q -l quiet -d "Don't show informative messages"
complete -c a2enmod -xa '(__fish_print_debian_apache_mods)'

View file

@ -0,0 +1,4 @@
complete -c a2ensite -s q -l quiet -d "Don't show informative messages"
complete -c a2ensite -xa '(__fish_print_debian_apache_sites)'

View file

@ -0,0 +1,6 @@
function __fish_print_debian_apache_confs
# Helper script for completions for a2enconf/a2disconf
for conf in /etc/apache2/conf-available/*.conf
basename "$conf" .conf
end
end

View file

@ -0,0 +1,6 @@
function __fish_print_debian_apache_mods
# Helper script for completions for a2enmod/a2dismod
for mod in /etc/apache2/mods-available/*.load
basename "$mod" .load
end
end

View file

@ -0,0 +1,6 @@
function __fish_print_debian_apache_sites
# Helper script for completions for a2ensite/a2dissite
for site in /etc/apache2/sites-available/*
basename "$site" .conf
end
end