2011-11-01 22:14:45 +02:00
|
|
|
# Red Hat & Debian GNU/Linux if{up,down} completion -*- shell-script -*-
|
2011-10-13 21:26:13 +03:00
|
|
|
|
2011-10-16 10:56:44 +03:00
|
|
|
_userland GNU || return 1
|
2011-04-05 00:35:51 +03:00
|
|
|
|
2010-06-09 22:53:43 +03:00
|
|
|
_ifupdown()
|
|
|
|
{
|
2011-04-20 17:13:48 +03:00
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
2010-06-09 22:53:43 +03:00
|
|
|
|
2011-11-09 23:28:11 +02:00
|
|
|
if [[ $cword -eq 1 ]]; then
|
2010-06-09 22:53:43 +03:00
|
|
|
_configured_interfaces
|
|
|
|
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
|
|
|
|
fi
|
|
|
|
|
|
|
|
return 0
|
|
|
|
} &&
|
2011-10-12 00:19:50 +03:00
|
|
|
complete -F _ifupdown ifup ifdown ifstatus
|
2010-06-09 22:53:43 +03:00
|
|
|
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|