Skip to content

Commit

Permalink
feat(ip): complete ip ntable show
Browse files Browse the repository at this point in the history
Co-Authored-By: Koichi Murase <myoga.murase@gmail.com>
  • Loading branch information
2 people authored and scop committed Aug 4, 2024
1 parent 7eb2eb2 commit 432f95f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,21 @@ _comp_cmd_ip()
# TODO
;;
show)
# TODO
case $prev in
dev)
_comp_compgen_available_interfaces
;;
name)
_comp_compgen_split -- "$(
{
ip -c=never ntable show 2>/dev/null || ip ntable show
} | command sed -ne 's/^inet6\{0,1\} //p'
)"
;;
*)
_comp_compgen -- -W 'dev name'
;;
esac
;;
*)
((cword == subcword)) &&
Expand Down

0 comments on commit 432f95f

Please sign in to comment.