]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tools: bpftool: Slightly ease bash completion updates
authorQuentin Monnet <quentin@isovalent.com>
Fri, 30 Jul 2021 21:54:29 +0000 (22:54 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 30 Jul 2021 22:40:27 +0000 (15:40 -0700)
commit510b4d4c5d4cbfdeaf35e4bc6483e8afa16b0e9e
tree85a39348d2e932ab730b3b188e05005640e69f5f
parent0b846445985895e75958ecd59061fd7bf77e0c3f
tools: bpftool: Slightly ease bash completion updates

Bash completion for bpftool gets two minor improvements in this patch.

Move the detection of attach types for "bpftool cgroup attach" outside
of the "case/esac" bloc, where we cannot reuse our variable holding the
list of supported attach types as a pattern list. After the change, we
have only one list of cgroup attach types to update when new types are
added, instead of the former two lists.

Also rename the variables holding lists of names for program types, map
types, and attach types, to make them more unique. This can make it
slightly easier to point people to the relevant variables to update, but
the main objective here is to help run a script to check that bash
completion is up-to-date with bpftool's source code.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210730215435.7095-2-quentin@isovalent.com
tools/bpf/bpftool/bash-completion/bpftool