Skip to content

Commit 9d294f6

Browse files
danobianakryiko
authored andcommitted
bpftool: bash: Add bash completion for root_id argument
This commit updates the bash completion script with the new root_id argument. Signed-off-by: Daniel Xu <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/37016c786620761e621a88240e36f6cb27a8f628.1734119028.git.dxu@dxuuu.xyz
1 parent a812d92 commit 9d294f6

File tree

1 file changed

+6
-1
lines changed
  • tools/bpf/bpftool/bash-completion

1 file changed

+6
-1
lines changed

tools/bpf/bpftool/bash-completion/bpftool

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,19 +930,24 @@ _bpftool()
930930
format)
931931
COMPREPLY=( $( compgen -W "c raw" -- "$cur" ) )
932932
;;
933+
root_id)
934+
return 0;
935+
;;
933936
c)
934-
COMPREPLY=( $( compgen -W "unsorted" -- "$cur" ) )
937+
COMPREPLY=( $( compgen -W "unsorted root_id" -- "$cur" ) )
935938
;;
936939
*)
937940
# emit extra options
938941
case ${words[3]} in
939942
id|file)
943+
COMPREPLY=( $( compgen -W "root_id" -- "$cur" ) )
940944
_bpftool_once_attr 'format'
941945
;;
942946
map|prog)
943947
if [[ ${words[3]} == "map" ]] && [[ $cword == 6 ]]; then
944948
COMPREPLY+=( $( compgen -W "key value kv all" -- "$cur" ) )
945949
fi
950+
COMPREPLY=( $( compgen -W "root_id" -- "$cur" ) )
946951
_bpftool_once_attr 'format'
947952
;;
948953
*)

0 commit comments

Comments
 (0)