Skip to content

Commit

Permalink
ip: Add some addr, addrlabel, and route arg completions
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jan 9, 2014
1 parent e777395 commit b5d0cdd
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ]] && \
Expand All @@ -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
Expand Down

0 comments on commit b5d0cdd

Please sign in to comment.