PageRenderTime 39ms CodeModel.GetById 37ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion.d/apache2ctl

http://github.com/brinkman83/bashrc
#! | 24 lines | 19 code | 5 blank | 0 comment | 0 complexity | f9ac67716e338399fcc2531c09dfeffd MD5 | raw file
 1# apache2ctl(1) completion
 2
 3have apache2ctl && {
 4_apache2ctl() {
 5    local APWORDS
 6
 7    COMPREPLY=()
 8    cur=`_get_cword`
 9
10    APWORDS=$(apache2ctl 2>&1 >/dev/null | head -n1 | cut -f3 -d" " | \
11        tr "|" " ")
12
13    COMPREPLY=( $( compgen -W "$APWORDS" -- "$cur" ) )
14}
15complete -F _apache2ctl apache2ctl
16}
17
18# Local variables:
19# mode: shell-script
20# sh-basic-offset: 4
21# sh-indent-comment: t
22# indent-tabs-mode: nil
23# End:
24# ex: ts=4 sw=4 et filetype=sh