tools: bpftool: alias show and list commands
iproute2 seems to accept show and list as aliases. Let's do the same thing, and by allowing both bring cgroup syntax back in line with maps and progs. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:

committed by
Daniel Borkmann

parent
65b875bcc8
commit
6ebe6dbd68
@@ -197,7 +197,7 @@ _bpftool()
|
||||
|
||||
local PROG_TYPE='id pinned tag'
|
||||
case $command in
|
||||
show)
|
||||
show|list)
|
||||
[[ $prev != "$command" ]] && return 0
|
||||
COMPREPLY=( $( compgen -W "$PROG_TYPE" -- "$cur" ) )
|
||||
return 0
|
||||
@@ -232,7 +232,7 @@ _bpftool()
|
||||
;;
|
||||
*)
|
||||
[[ $prev == $object ]] && \
|
||||
COMPREPLY=( $( compgen -W 'dump help pin show' -- \
|
||||
COMPREPLY=( $( compgen -W 'dump help pin show list' -- \
|
||||
"$cur" ) )
|
||||
;;
|
||||
esac
|
||||
@@ -240,7 +240,7 @@ _bpftool()
|
||||
map)
|
||||
local MAP_TYPE='id pinned'
|
||||
case $command in
|
||||
show|dump)
|
||||
show|list|dump)
|
||||
case $prev in
|
||||
$command)
|
||||
COMPREPLY=( $( compgen -W "$MAP_TYPE" -- "$cur" ) )
|
||||
@@ -343,7 +343,7 @@ _bpftool()
|
||||
*)
|
||||
[[ $prev == $object ]] && \
|
||||
COMPREPLY=( $( compgen -W 'delete dump getnext help \
|
||||
lookup pin show update' -- "$cur" ) )
|
||||
lookup pin show list update' -- "$cur" ) )
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
Reference in New Issue
Block a user