mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
tools: bpftool: add bash completion for CFG dump
Add bash completion for the "visual" keyword used for dumping the CFG of eBPF programs with bpftool. Make sure we only complete with this keyword when we dump "xlated" (and not "jited") instructions. Acked-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
b6c1cedb49
commit
d96fc832bc
@ -147,7 +147,7 @@ _bpftool()
|
||||
|
||||
# Deal with simplest keywords
|
||||
case $prev in
|
||||
help|key|opcodes)
|
||||
help|key|opcodes|visual)
|
||||
return 0
|
||||
;;
|
||||
tag)
|
||||
@ -224,8 +224,13 @@ _bpftool()
|
||||
;;
|
||||
*)
|
||||
_bpftool_once_attr 'file'
|
||||
if _bpftool_search_list 'xlated'; then
|
||||
COMPREPLY+=( $( compgen -W 'opcodes visual' -- \
|
||||
"$cur" ) )
|
||||
else
|
||||
COMPREPLY+=( $( compgen -W 'opcodes' -- \
|
||||
"$cur" ) )
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user