BPF List
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andriin@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>, <ast@fb.com>,
	<daniel@iogearbox.net>
Cc: <andrii.nakryiko@gmail.com>, <kernel-team@fb.com>,
	Andrii Nakryiko <andriin@fb.com>,
	Quentin Monnet <quentin.monnet@netronome.com>
Subject: [RFC PATCH bpf-next 16/16] bpftool: add `gen skeleton` BASH completions
Date: Tue, 3 Dec 2019 23:00:15 -0800	[thread overview]
Message-ID: <20191204070015.3523523-17-andriin@fb.com> (raw)
In-Reply-To: <20191204070015.3523523-1-andriin@fb.com>

Add BASH completions for gen sub-command.

Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/bpf/bpftool/bash-completion/bpftool | 11 +++++++++++
 tools/bpf/bpftool/main.c                  |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool
index 70493a6da206..986519cc58d1 100644
--- a/tools/bpf/bpftool/bash-completion/bpftool
+++ b/tools/bpf/bpftool/bash-completion/bpftool
@@ -716,6 +716,17 @@ _bpftool()
                     ;;
             esac
             ;;
+        gen)
+            case $command in
+                skeleton)
+                    _filedir
+		    ;;
+                *)
+                    [[ $prev == $object ]] && \
+                        COMPREPLY=( $( compgen -W 'skeleton help' -- "$cur" ) )
+                    ;;
+            esac
+            ;;
         cgroup)
             case $command in
                 show|list|tree)
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c
index 758b294e8a7d..1fe91c558508 100644
--- a/tools/bpf/bpftool/main.c
+++ b/tools/bpf/bpftool/main.c
@@ -58,7 +58,7 @@ static int do_help(int argc, char **argv)
 		"       %s batch file FILE\n"
 		"       %s version\n"
 		"\n"
-		"       OBJECT := { prog | map | cgroup | perf | net | feature | btf }\n"
+		"       OBJECT := { prog | map | cgroup | perf | net | feature | btf | gen }\n"
 		"       " HELP_SPEC_OPTIONS "\n"
 		"",
 		bin_name, bin_name, bin_name);
-- 
2.17.1


      parent reply	other threads:[~2019-12-04  7:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  6:59 [RFC PATCH bpf-next 00/16] Add code-generated BPF object skeleton support Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 01/16] libbpf: don't require root for bpf_object__open() Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 02/16] libbpf: add generic bpf_program__attach() Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 03/16] libbpf: move non-public APIs from libbpf.h to libbpf_internal.h Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 04/16] libbpf: add BPF_EMBED_OBJ macro for embedding BPF .o files Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 05/16] libbpf: expose field/var declaration emitting API internally Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 06/16] libbpf: expose BPF program's function name Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 07/16] libbpf: refactor global data map initialization Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 08/16] libbpf: postpone BTF ID finding for TRACING programs to load phase Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 09/16] libbpf: reduce log level of supported section names dump Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 10/16] libbpf: add experimental BPF object skeleton support Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 11/16] bpftool: add skeleton codegen command Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 12/16] libbpf/samples: add runqslower sample to libbpf samples Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 13/16] selftests/bpf: add BPF skeletons selftests and convert attach_probe.c Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 14/16] selftests/bpf: convert few more selftest to skeletons Andrii Nakryiko
2019-12-04  7:00 ` [RFC PATCH bpf-next 15/16] selftests/bpf: add test validating data section to struct convertion layout Andrii Nakryiko
2019-12-04  7:00 ` Andrii Nakryiko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204070015.3523523-17-andriin@fb.com \
    --to=andriin@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=quentin.monnet@netronome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox