Skip to content

Commit a4d4ebc

Browse files
remijouannetscop
authored andcommitted
fix(ip): netns list parsing with netnsids included
ip netns output may include netnsid if set since https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=d182ee1307c7a83b581d8f6d473bbce2004420c0
1 parent 9b535a1 commit a4d4ebc

File tree

1 file changed

+3
-1
lines changed
  • completions

1 file changed

+3
-1
lines changed

completions/ip

+3-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ _ip()
360360
delete | exec | pids | set)
361361
[[ $prev == "$subcmd" ]] &&
362362
COMPREPLY=($(compgen -W "$(
363-
$1 -c=never netns list 2>/dev/null || $1 netns list
363+
{
364+
$1 -c=never netns list 2>/dev/null || $1 netns list
365+
} | awk '{print $1}'
364366
)" -- "$cur"))
365367
;;
366368
*)

0 commit comments

Comments
 (0)