mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
bpftool: update bash-completion w/ new c option for btf dump
Add bash completion for new C btf dump option. Cc: Quentin Monnet <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
1 parent
220ba45112
commit
90eea4086d
1 file changed
+17
-4
@@ -638,11 +638,24 @@ _bpftool()
|
||||
esac
|
||||
return 0
|
||||
;;
|
||||
format)
|
||||
COMPREPLY=( $( compgen -W "c raw" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
if [[ $cword == 6 ]] && [[ ${words[3]} == "map" ]]; then
|
||||
COMPREPLY+=( $( compgen -W 'key value kv all' -- \
|
||||
"$cur" ) )
|
||||
fi
|
||||
# emit extra options
|
||||
case ${words[3]} in
|
||||
id|file)
|
||||
_bpftool_once_attr 'format'
|
||||
;;
|
||||
map|prog)
|
||||
if [[ ${words[3]} == "map" ]] && [[ $cword == 6 ]]; then
|
||||
COMPREPLY+=( $( compgen -W "key value kv all" -- "$cur" ) )
|
||||
fi
|
||||
_bpftool_once_attr 'format'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in new issue
Block a user