ip: Add some addr, addrlabel, and route arg completions

This commit is contained in:
Ville Skyttä 2014-01-09 23:12:34 +02:00
parent e777395ac3
commit b5d0cdd802

View File

@ -123,10 +123,22 @@ _ip()
addr)
case $subcmd in
add|change|replace)
# TODO
if [[ $prev == dev ]]; then
_available_interfaces
elif [[ $prev == scope ]]; then
_iproute2_etc rt_scopes
else
: # TODO
fi
;;
del)
# TODO
if [[ $prev == dev ]]; then
_available_interfaces
elif [[ $prev == scope ]]; then
_iproute2_etc rt_scopes
else
: # TODO
fi
;;
show|flush)
if [[ $cword -eq $subcword+1 ]]; then
@ -151,7 +163,11 @@ _ip()
addrlabel)
case $subcmd in
list|add|del|flush)
# TODO
if [[ $prev == dev ]]; then
_available_interfaces
else
: # TODO
fi
;;
*)
[[ $cword -eq $subcword ]] && \
@ -164,7 +180,11 @@ _ip()
route)
case $subcmd in
list|flush)
# TODO
if [[ $prev == proto ]]; then
_iproute2_etc rt_protos
else
: # TODO
fi
;;
get)
# TODO