]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: add completion for bpftool prog "loadall"
authorQuentin Monnet <quentin.monnet@netronome.com>
Mon, 8 Jul 2019 13:05:46 +0000 (14:05 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 8 Jul 2019 15:20:34 +0000 (17:20 +0200)
commit569c7e63edf74a8800c342ef65e07c0083f7893f
treef6ce48b546e604f7b99a51739b851c18b314b47e
parent921a7a569f54f7ee59fcefa7ec69e852dae359e2
tools: bpftool: add completion for bpftool prog "loadall"

Bash completion for proposing the "loadall" subcommand is missing. Let's
add it to the completion script.

Add a specific case to propose "load" and "loadall" for completing:

    $ bpftool prog load
                       ^ cursor is here

Otherwise, completion considers that $command is in load|loadall and
starts making related completions (file or directory names, as the
number of words on the command line is below 6), when the only suggested
keywords should be "load" and "loadall" until one has been picked and a
space entered after that to move to the next word.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/bash-completion/bpftool