Skip to content

Commit

Permalink
feat(ip): Complete 'route get' options
Browse files Browse the repository at this point in the history
  • Loading branch information
yedayak authored and scop committed May 7, 2024
1 parent 0bb1c5e commit 12fbdb1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,22 @@ _comp_cmd_ip()
fi
;;
get)
# TODO
case $prev in
as | dport | from | sport | ipproto | vrf | to | tos | mark)
: # TODO: Can we complete ipproto, tos, or vrf?
;;
uid)
_comp_compgen_uids
;;
oif | iif | dev)
_comp_compgen_available_interfaces -a
;;
*)
# TODO: 'iif' only works if also 'from' is specified
_comp_compgen -- -W 'as connected dport from fibmatch
iif ipproto mark notify oif sport to tos uid vrf'
;;
esac
;;
a | add | d | del | change | append | r | replace)
if [[ $prev == via ]]; then
Expand Down

0 comments on commit 12fbdb1

Please sign in to comment.