PageRenderTime 114ms CodeModel.GetById 111ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion.d/resolvconf

http://github.com/brinkman83/bashrc
#! | 31 lines | 26 code | 5 blank | 0 comment | 0 complexity | 7192e6ecceac5f4bc9dbc8b51c727c1e MD5 | raw file
 1# bash completion for resolvconf
 2
 3have resolvconf &&
 4_resolvconf()
 5{
 6    local cur command
 7
 8    COMPREPLY=()
 9    cur=`_get_cword`
10    prev=${COMP_WORDS[COMP_CWORD-1]}
11
12    case $prev in
13        -@(a|d))
14            _available_interfaces
15            return 0
16            ;;
17    esac
18
19    if [[ "$cur" == -* ]]; then
20        COMPREPLY=( $( compgen -W '-a -d -u' -- "$cur" ) )
21    fi
22} &&
23complete -F _resolvconf resolvconf
24
25# Local variables:
26# mode: shell-script
27# sh-basic-offset: 4
28# sh-indent-comment: t
29# indent-tabs-mode: nil
30# End:
31# ex: ts=4 sw=4 et filetype=sh