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 @@ -188,13 +188,24 @@ _comp_cmd_ip()
188
188
a | addr | address)
189
189
case $subcmd in
190
190
add | change | replace)
191
- if [[ $prev == dev ]]; then
192
- _comp_compgen_available_interfaces
193
- elif [[ $prev == scope ]]; then
194
- _comp_cmd_ip__iproute2_etc rt_scopes
195
- else
196
- : # TODO
197
- fi
191
+ case $prev in
192
+ dev | label)
193
+ _comp_compgen_available_interfaces
194
+ ;;
195
+ scope)
196
+ _comp_cmd_ip__iproute2_etc rt_scopes
197
+ ;;
198
+ broadcast | anycast | peer | metric)
199
+ :
200
+ ;;
201
+ valid_lft | preferred_lft)
202
+ _comp_compgen -- -W ' forever'
203
+ ;;
204
+ * )
205
+ _comp_compgen -- -W ' anycast autojoin broadcast dev home label scope nodad metric mngtmpaddr
206
+ noprefixroute valid_lft peer preferred_lft'
207
+ ;;
208
+ esac
198
209
;;
199
210
del)
200
211
if [[ $prev == dev ]]; then
You can’t perform that action at this time.
0 commit comments