File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -138,9 +138,20 @@ _comp_cmd_ip()
138
138
_comp_cmd_ip__iproute2_etc group
139
139
fi
140
140
;;
141
+ property)
142
+ if (( cword - 1 == subcword)) ; then
143
+ _comp_compgen -- -W ' add del'
144
+ elif [[ $prev == dev ]]; then
145
+ _comp_compgen_available_interfaces
146
+ elif [[ $prev == altname ]]; then
147
+ return
148
+ else
149
+ _comp_compgen -- -W ' dev altname'
150
+ fi
151
+ ;;
141
152
* )
142
153
(( cword == subcword)) &&
143
- _comp_compgen -- -W ' help add delete set show'
154
+ _comp_compgen -- -W ' help add delete set show property '
144
155
;;
145
156
esac
146
157
;;
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ def test_monitor(self, completion):
36
36
def test_netconf (self , completion ):
37
37
assert "show" in completion
38
38
39
+ @pytest .mark .complete ("ip link property add " )
40
+ def test_link_property (self , completion ):
41
+ assert "altname" in completion
42
+ assert "dev" in completion
43
+
39
44
@pytest .mark .complete (
40
45
"ip addr show type " ,
41
46
require_cmd = True ,
You can’t perform that action at this time.
0 commit comments