mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 20:34:20 +08:00
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: Andrii Nakryiko <andriin@fb.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
220ba45112
commit
90eea4086d
@ -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)
|
||||||
fi
|
_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
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user