tools: bpftool: fix bash completion for bpftool prog (attach|detach)
authorQuentin Monnet <quentin.monnet@netronome.com>
Fri, 30 Nov 2018 16:25:45 +0000 (16:25 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 30 Nov 2018 22:06:06 +0000 (14:06 -0800)
commitcad4977344b35ea116ec5fefe91a76b1dfa113f5
tree04ba49432fb1fb4421eddac4f84786c4fc727c23
parent327e5dab6dd8559ba28739ec8873350d7b5bb080
tools: bpftool: fix bash completion for bpftool prog (attach|detach)

Fix bash completion for "bpftool prog (attach|detach) PROG TYPE MAP" so
that the list of indices proposed for MAP are map indices, and not PROG
indices. Also use variables for map and prog reference types ("id",
"pinned", and "tag" for programs).

Fixes: b7d3826c2ed6 ("bpf: bpftool, add support for attaching programs to maps")
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/bash-completion/bpftool