Skip to content

Commit

Permalink
feat(ip): Complete ip route list options
Browse files Browse the repository at this point in the history
  • Loading branch information
yedayak authored and scop committed May 8, 2024
1 parent ba80203 commit 43beafc
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,26 @@ _comp_cmd_ip()
r | route)
case $subcmd in
list | flush | save)
if [[ $prev == proto ]]; then
_comp_cmd_ip__iproute2_etc rt_protos
else
: # TODO
fi
case "$prev" in
proto)
_comp_cmd_ip__iproute2_etc rt_protos
;;
table)
_comp_compgen -- -W 'local main default all'
;;
scope)
_comp_cmd_ip__iproute2_etc rt_scopes
;;
root | match | exact | vrf)
: # TODO: Can we complete vrf?
;;
type)
_comp_compgen -- -W 'unicast local broadcast multicast throw unreachable prohibit blackhole nat'
;;
*)
_comp_compgen -- -W 'root match exact table vrf proto type scope'
;;
esac
;;
get)
case $prev in
Expand Down

0 comments on commit 43beafc

Please sign in to comment.