From 12fbdb163b9ffabb5f673c910a98edc8eaa6ac65 Mon Sep 17 00:00:00 2001 From: Yedaya Katsman Date: Thu, 18 Apr 2024 21:59:12 +0300 Subject: [PATCH] feat(ip): Complete 'route get' options --- completions/ip | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/completions/ip b/completions/ip index 0038f48f30b..57d6780f727 100644 --- a/completions/ip +++ b/completions/ip @@ -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