]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tools: bpftool: add bash completion for bpftool
authorQuentin Monnet <quentin.monnet@netronome.com>
Thu, 26 Oct 2017 21:16:05 +0000 (14:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Oct 2017 09:37:33 +0000 (18:37 +0900)
commit995231c820e3bd3633cb38bf4ea6f2541e1da331
tree8ffebe0e14827876e60e3dcd566836562ecda474
parent2660d226d9901c2c82c81f0b3dc5e6737eed2dfe
tools: bpftool: add bash completion for bpftool

Add a completion file for bash. The completion function runs bpftool
when needed, making it smart enough to help users complete ids or tags
for eBPF programs and maps currently on the system.

Update Makefile to install completion file to
/usr/share/bash-completion/completions when running `make install`.

Emacs file mode and (at the end) Vim modeline have been added, to keep
the style in use for most existing bash completion files. In this, it
differs from tools/perf/perf-completion.sh, which seems to be the only
other completion file among the kernel sources repository. This is also
valid for indent style: 4-space indents, as in other completion files.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/bash-completion/bpftool [new file with mode: 0644]