[Bash-completion-commits] [bash-completion] 01/02: ip: Add some addr, addrlabel, and route arg completions

Ville Skyttä scop-guest at moszumanska.debian.org
Sat Jan 18 20:03:26 UTC 2014


This is an automated email from the git hooks/post-receive script.

scop-guest pushed a commit to branch master
in repository bash-completion.

commit b5d0cdd802817708bb1fdb03880eb95e9be9e67b
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Thu Jan 9 23:12:34 2014 +0200

    ip: Add some addr, addrlabel, and route arg completions
---
 completions/ip | 28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/completions/ip b/completions/ip
index b073c36..013042c 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git



More information about the Bash-completion-commits mailing list