From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Gushchin Subject: Re: [PATCH v2 bpf-next 3/3] bpftool: add bash completion for cgroup tree command Date: Fri, 6 Jul 2018 14:29:42 -0700 Message-ID: <20180706212939.GA3582@castle.DHCP.thefacebook.com> References: <20180706183012.6475-1-guro@fb.com> <20180706183012.6475-3-guro@fb.com> <20180706135805.1d90ff33@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , Quentin Monnet , Daniel Borkmann , Alexei Starovoitov To: Jakub Kicinski Return-path: Content-Disposition: inline In-Reply-To: <20180706135805.1d90ff33@cakuba.netronome.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Fri, Jul 06, 2018 at 01:58:05PM -0700, Jakub Kicinski wrote: > On Fri, 6 Jul 2018 11:30:12 -0700, Roman Gushchin wrote: > > This commit adds a bash completion to the bpftool cgroup tree > > command. > > > > Signed-off-by: Roman Gushchin > > Cc: Jakub Kicinski > > Cc: Quentin Monnet > > Cc: Daniel Borkmann > > Cc: Alexei Starovoitov > > --- > > tools/bpf/bpftool/bash-completion/bpftool | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool > > index fffd76f4998b..82681eb9c02a 100644 > > --- a/tools/bpf/bpftool/bash-completion/bpftool > > +++ b/tools/bpf/bpftool/bash-completion/bpftool > > @@ -414,6 +414,9 @@ _bpftool() > > _filedir > > return 0 > > ;; > > + tree) > > + _filedir > > + return 0 > > Oh you have not tested this at all, have you? > > You're missing ;; at the end of the case, this is not correct bash > syntax and completely breaks the script. > > When you respin please use spaces instead of tabs (I know, *very* > annoying but that's apparently how things should be for bash > completions :/). > > And please add "tree" to the *) case which completes the actions. Sorry, thought it's simple enough for a copy-paste, but no :) Fixed in v3. Thanks!