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()
138138 _comp_cmd_ip__iproute2_etc group
139139 fi
140140 ;;
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+ ;;
141152 * )
142153 (( cword == subcword)) &&
143- _comp_compgen -- -W ' help add delete set show'
154+ _comp_compgen -- -W ' help add delete set show property '
144155 ;;
145156 esac
146157 ;;
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ def test_monitor(self, completion):
3636 def test_netconf (self , completion ):
3737 assert "show" in completion
3838
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+
3944 @pytest .mark .complete (
4045 "ip addr show type " ,
4146 require_cmd = True ,
You can’t perform that action at this time.
0 commit comments