Skip to content

Commit 432f95f

Browse files
yedayakakinomyoga
authored andcommitted
feat(ip): complete ip ntable show
Co-Authored-By: Koichi Murase <[email protected]>
1 parent 7eb2eb2 commit 432f95f

File tree

1 file changed

+15
-1
lines changed
  • completions

1 file changed

+15
-1
lines changed

completions/ip

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,21 @@ _comp_cmd_ip()
456456
# TODO
457457
;;
458458
show)
459-
# TODO
459+
case $prev in
460+
dev)
461+
_comp_compgen_available_interfaces
462+
;;
463+
name)
464+
_comp_compgen_split -- "$(
465+
{
466+
ip -c=never ntable show 2>/dev/null || ip ntable show
467+
} | command sed -ne 's/^inet6\{0,1\} //p'
468+
)"
469+
;;
470+
*)
471+
_comp_compgen -- -W 'dev name'
472+
;;
473+
esac
460474
;;
461475
*)
462476
((cword == subcword)) &&

0 commit comments

Comments
 (0)