Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6157545ybv; Tue, 18 Feb 2020 11:03:10 -0800 (PST) X-Google-Smtp-Source: APXvYqyQg7b9lUWIbs9arREc1V+rqT2kciub+8QSxWc0rRajOFC1zY6AnQE9XElPZu8ZNDLZiMAG X-Received: by 2002:a9d:6288:: with SMTP id x8mr16363915otk.2.1582052589866; Tue, 18 Feb 2020 11:03:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582052589; cv=none; d=google.com; s=arc-20160816; b=FiHzNwKKfjt9utwL0mf9JI3FX9MqTmgEva4Lzqdc872Mq+V6Yrd2acSRCK4NCorRVB HHOgesfsx0092FPjEiBusN/XPdKDHhsoACMNib7VvRQu6zcbf66uT6/am230IuX5+OZf 6/cUIoLDllrDdz9bbasSVCYsWYqKYLhCXU6ikxJYceQju8BIez+QddnK9qfy+9Dyqvgv wflqNm/JziI46D9DNLiwJCEj1J8WUWbj3VH0+U2VBMM8hyC6NWxgWY8557i0HYavEpXr maUCCE6DwoUnfOz4dK7Vc0lBkMNTp1FxXuTzt4pGFmAHNubX0rImzZ3EO5EWScg9d6Wc s1og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NGrdljbPyMGfSRiktztgicqcUR6/7v0GRVDFgK+ACaA=; b=RuQnQnvDpq1Hm86PRColWHEWYRnqyj1Kp68+DO/1ZAu2buDiTO88vpe4gQjFp1nxtZ VjM/3N1+TS9dsBXAYq924Whxcv6x8f7XPonSJTdQUJEsLMbqpB5G6Czzpd0wFFbl0vRf ev/0AAwgOb87NG/T6jK3+bFOroAWQlHPC6Ft7lIZEmRaNj8PglPCM4zAcOdEcW/vTYXI yr8DBZ6KWyYgH9+xafc7K8czwwYVFgs/hoX8liBo5BjdFMf7OLN89iwQNP9KtW5Znhzz Ht3ioEjRLP5YJEj1H4Gj7ZhZkk65BII09ci4WsDI8Q+F2bwnrb1JISPxpj3SxOcdshWu ving== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n24si2228642otf.58.2020.02.18.11.02.57; Tue, 18 Feb 2020 11:03:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbgBRTCp (ORCPT + 99 others); Tue, 18 Feb 2020 14:02:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:35758 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbgBRTCo (ORCPT ); Tue, 18 Feb 2020 14:02:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 43D69ADE4; Tue, 18 Feb 2020 19:02:40 +0000 (UTC) From: Michal Rostecki To: bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , Quentin Monnet , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org Subject: [PATCH bpf-next 5/6] bpftool: Update bash completion for "bpftool feature" command Date: Tue, 18 Feb 2020 20:02:22 +0100 Message-Id: <20200218190224.22508-6-mrostecki@opensuse.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200218190224.22508-1-mrostecki@opensuse.org> References: <20200218190224.22508-1-mrostecki@opensuse.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update bash completion for "bpftool feature" command with information about new arguments: "section", "filter_id" and "filter_out". Signed-off-by: Michal Rostecki --- tools/bpf/bpftool/bash-completion/bpftool | 32 +++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool index 754d8395e451..ff8ac9bebdda 100644 --- a/tools/bpf/bpftool/bash-completion/bpftool +++ b/tools/bpf/bpftool/bash-completion/bpftool @@ -981,14 +981,30 @@ _bpftool() feature) case $command in probe) - [[ $prev == "prefix" ]] && return 0 - if _bpftool_search_list 'macros'; then - COMPREPLY+=( $( compgen -W 'prefix' -- "$cur" ) ) - else - COMPREPLY+=( $( compgen -W 'macros' -- "$cur" ) ) - fi - _bpftool_one_of_list 'kernel dev' - return 0 + case $prev in + $command) + COMPREPLY+=( $( compgen -W 'kernel dev section filter_in filter_out macros' -- \ + "$cur" ) ) + return 0 + ;; + section) + COMPREPLY+=( $( compgen -W 'system_config syscall_config program_types map_types helpers misc' -- \ + "$cur" ) ) + return 0 + ;; + filter_in|filter_out|prefix) + return 0 + ;; + macros) + COMPREPLY+=( $( compgen -W 'prefix' -- "$cur" ) ) + return 0 + ;; + *) + _bpftool_one_of_list 'kernel dev' + _bpftool_once_attr 'section filter_in filter_out macros' + return 0 + ;; + esac ;; *) [[ $prev == $object ]] && \ -- 2.25.0