Skip to content

feat(ip): Complete 'route get' options #1170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,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