summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/bash-completion
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-01-02 14:48:36 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-04 12:28:46 +0100
commit6ebe6dbd6886af07b102aca42e44edbee94a22d9 (patch)
treee4e10cfad444b366c3f06729f3ad44233babb89b /tools/bpf/bpftool/bash-completion
parent65b875bcc816335be41c336a595adbc10bd885cb (diff)
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>
Diffstat (limited to 'tools/bpf/bpftool/bash-completion')
-rw-r--r--tools/bpf/bpftool/bash-completion/bpftool8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool
index 7febee05c8e7..0137866bb8f6 100644
--- a/tools/bpf/bpftool/bash-completion/bpftool
+++ b/tools/bpf/bpftool/bash-completion/bpftool
@@ -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
;;