Skip to content

Commit 12fbdb1

Browse files
yedayakscop
authored andcommitted
feat(ip): Complete 'route get' options
1 parent 0bb1c5e commit 12fbdb1

File tree

1 file changed

+16
-1
lines changed
  • completions

1 file changed

+16
-1
lines changed

completions/ip

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,22 @@ _comp_cmd_ip()
256256
fi
257257
;;
258258
get)
259-
# TODO
259+
case $prev in
260+
as | dport | from | sport | ipproto | vrf | to | tos | mark)
261+
: # TODO: Can we complete ipproto, tos, or vrf?
262+
;;
263+
uid)
264+
_comp_compgen_uids
265+
;;
266+
oif | iif | dev)
267+
_comp_compgen_available_interfaces -a
268+
;;
269+
*)
270+
# TODO: 'iif' only works if also 'from' is specified
271+
_comp_compgen -- -W 'as connected dport from fibmatch
272+
iif ipproto mark notify oif sport to tos uid vrf'
273+
;;
274+
esac
260275
;;
261276
a | add | d | del | change | append | r | replace)
262277
if [[ $prev == via ]]; then

0 commit comments

Comments
 (0)