diff options
author | Daniel Xu <dxu@dxuuu.xyz> | 2024-12-13 12:44:12 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-12-13 14:35:42 -0800 |
commit | 9d294f6986789e20696f44c2deb4c7f7b8ae4704 (patch) | |
tree | 1a2c31dab8f42af0f97dc5c392f3290c2de29093 /tools/bpf | |
parent | a812d92ed2aee2d57dccb12b289377265f4ce5e7 (diff) |
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 <dxu@dxuuu.xyz>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/37016c786620761e621a88240e36f6cb27a8f628.1734119028.git.dxu@dxuuu.xyz
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/bash-completion/bpftool | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool index 0c541498c301..1ce409a6cbd9 100644 --- a/tools/bpf/bpftool/bash-completion/bpftool +++ b/tools/bpf/bpftool/bash-completion/bpftool @@ -930,19 +930,24 @@ _bpftool() format) COMPREPLY=( $( compgen -W "c raw" -- "$cur" ) ) ;; + root_id) + return 0; + ;; c) - COMPREPLY=( $( compgen -W "unsorted" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "unsorted root_id" -- "$cur" ) ) ;; *) # emit extra options case ${words[3]} in id|file) + COMPREPLY=( $( compgen -W "root_id" -- "$cur" ) ) _bpftool_once_attr 'format' ;; map|prog) if [[ ${words[3]} == "map" ]] && [[ $cword == 6 ]]; then COMPREPLY+=( $( compgen -W "key value kv all" -- "$cur" ) ) fi + COMPREPLY=( $( compgen -W "root_id" -- "$cur" ) ) _bpftool_once_attr 'format' ;; *) |