blob: fee87d6bd33b1e971116ed12c7358a217a43c481 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Red Hat & Debian GNU/Linux if{up,down} completion -*- shell-script -*-
_userland GNU || return 1
_ifupdown()
{
local cur prev words cword
_init_completion || return
if [ $cword -eq 1 ]; then
_configured_interfaces
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
fi
return 0
} &&
complete -F _ifupdown ifup ifdown ifstatus
# ex: ts=4 sw=4 et filetype=sh
|