diff --git a/completions/ip b/completions/ip index b073c36f..013042c1 100644 --- a/completions/ip +++ b/completions/ip @@ -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