Commit 90eea408 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

bpftool: update bash-completion w/ new c option for btf dump

Add bash completion for new C btf dump option.

Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 220ba451
...@@ -638,11 +638,24 @@ _bpftool() ...@@ -638,11 +638,24 @@ _bpftool()
esac esac
return 0 return 0
;; ;;
format)
COMPREPLY=( $( compgen -W "c raw" -- "$cur" ) )
;;
*) *)
if [[ $cword == 6 ]] && [[ ${words[3]} == "map" ]]; then # emit extra options
COMPREPLY+=( $( compgen -W 'key value kv all' -- \ case ${words[3]} in
"$cur" ) ) id|file)
_bpftool_once_attr 'format'
;;
map|prog)
if [[ ${words[3]} == "map" ]] && [[ $cword == 6 ]]; then
COMPREPLY+=( $( compgen -W "key value kv all" -- "$cur" ) )
fi fi
_bpftool_once_attr 'format'
;;
*)
;;
esac
return 0 return 0
;; ;;
esac esac
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment