Skip to content

feat(ip): Complete ip route list options #1180

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 8, 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
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