Split ifup and ifdown completions into contrib/ifupdown.
This commit is contained in:
parent
887361302b
commit
cdbfd8e224
1
CHANGES
1
CHANGES
@ -61,6 +61,7 @@ bash-completion (2.x)
|
||||
* Split kill, look, and renice completions into contrib/util-linux.
|
||||
* Split killall, pkill, pgrep and related completions into contrib/procps.
|
||||
* Split ipsec completion into contrib/ipsec.
|
||||
* Split ifup and ifdown completions into contrib/ifupdown.
|
||||
* Do basic HTML file completion with Firefox and Chrome and friends,
|
||||
and Epiphany.
|
||||
* Do basic diff/patch completion with cdiff and kompare.
|
||||
|
@ -55,6 +55,7 @@ bashcomp_DATA = contrib/abook \
|
||||
contrib/heimdal \
|
||||
contrib/hping2 \
|
||||
contrib/iconv \
|
||||
contrib/ifupdown \
|
||||
contrib/imagemagick \
|
||||
contrib/info \
|
||||
contrib/iptables \
|
||||
|
@ -1082,26 +1082,6 @@ _dvd_devices()
|
||||
patch configure build install reinstall deinstall clean clean-depends \
|
||||
kernel buildworld' make
|
||||
|
||||
# Red Hat & Debian GNU/Linux if{up,down} completion
|
||||
#
|
||||
[ $USERLAND = GNU ] && { have ifup || have ifdown; } &&
|
||||
_ifupdown()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
_configured_interfaces
|
||||
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _ifupdown ifup ifdown
|
||||
[ $USERLAND = GNU ] && have ifstatus && complete -F _ifupdown ifstatus
|
||||
|
||||
# This function provides simple user@host completion
|
||||
#
|
||||
_user_at_host() {
|
||||
|
27
contrib/ifupdown
Normal file
27
contrib/ifupdown
Normal file
@ -0,0 +1,27 @@
|
||||
# Red Hat & Debian GNU/Linux if{up,down} completion
|
||||
#
|
||||
[ $USERLAND = GNU ] && { have ifup || have ifdown; } &&
|
||||
_ifupdown()
|
||||
{
|
||||
local cur
|
||||
|
||||
COMPREPLY=()
|
||||
cur=`_get_cword`
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
_configured_interfaces
|
||||
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _ifupdown ifup ifdown
|
||||
[ $USERLAND = GNU ] && have ifstatus && complete -F _ifupdown ifstatus
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
# sh-basic-offset: 4
|
||||
# sh-indent-comment: t
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
Loading…
x
Reference in New Issue
Block a user