File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -181,13 +181,24 @@ _comp_cmd_ip()
181
181
a | addr | address)
182
182
case $subcmd in
183
183
add | change | replace)
184
- if [[ $prev == dev ]]; then
185
- _comp_compgen_available_interfaces
186
- elif [[ $prev == scope ]]; then
187
- _comp_cmd_ip__iproute2_etc rt_scopes
188
- else
189
- : # TODO
190
- fi
184
+ case $prev in
185
+ dev | label)
186
+ _comp_compgen_available_interfaces
187
+ ;;
188
+ scope)
189
+ _comp_cmd_ip__iproute2_etc rt_scopes
190
+ ;;
191
+ broadcast | anycast | peer | metric)
192
+ :
193
+ ;;
194
+ valid_lft | preferred_lft)
195
+ _comp_compgen -- -W ' forever'
196
+ ;;
197
+ * )
198
+ _comp_compgen -- -W ' anycast broadcast dev home label scope nodad metric mngtmpaddr
199
+ noprefixroute valid_lft peer preferred_lft'
200
+ ;;
201
+ esac
191
202
;;
192
203
del)
193
204
if [[ $prev == dev ]]; then
You can’t perform that action at this time.
0 commit comments