diff options
| author | Tao Chen <chen.dylane@linux.dev> | 2025-07-23 22:44:42 +0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-08-01 18:03:23 -0700 |
| commit | f3af62b6cee8af9f07012051874af2d2a451f0e5 (patch) | |
| tree | 2697107be72442cb732abe7797918f06de24a06f /tools/bpf/bpftool/bash-completion | |
| parent | b7f6400849162b918020c5d10d5b7f378afbf470 (diff) | |
bpftool: Add bash completion for token argument
This commit updates the bash completion script with the
new token argument.
$ bpftool token
help list show
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Link: https://lore.kernel.org/r/20250723144442.1427943-3-chen.dylane@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/bash-completion')
| -rw-r--r-- | tools/bpf/bpftool/bash-completion/bpftool | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool index a759ba24471d..527bb47ac462 100644 --- a/tools/bpf/bpftool/bash-completion/bpftool +++ b/tools/bpf/bpftool/bash-completion/bpftool @@ -1215,6 +1215,17 @@ _bpftool() ;; esac ;; + token) + case $command in + show|list) + return 0 + ;; + *) + [[ $prev == $object ]] && \ + COMPREPLY=( $( compgen -W 'help show list' -- "$cur" ) ) + ;; + esac + ;; esac } && complete -F _bpftool bpftool |
