提交 d96fc832 编写于 作者: Q Quentin Monnet 提交者: Alexei Starovoitov

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: NJiong Wang <jiong.wang@netronome.com>
Signed-off-by: NQuentin Monnet <quentin.monnet@netronome.com>
Acked-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
上级 b6c1cedb
......@@ -147,7 +147,7 @@ _bpftool()
# Deal with simplest keywords
case $prev in
help|key|opcodes)
help|key|opcodes|visual)
return 0
;;
tag)
......@@ -223,11 +223,16 @@ _bpftool()
return 0
;;
*)
_bpftool_once_attr 'file'
_bpftool_once_attr 'file'
if _bpftool_search_list 'xlated'; then
COMPREPLY+=( $( compgen -W 'opcodes visual' -- \
"$cur" ) )
else
COMPREPLY+=( $( compgen -W 'opcodes' -- \
"$cur" ) )
return 0
;;
fi
return 0
;;
esac
;;
pin)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册