From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D20DC10F13 for ; Thu, 11 Apr 2019 16:14:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A71D2073F for ; Thu, 11 Apr 2019 16:14:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbfDKQOk (ORCPT ); Thu, 11 Apr 2019 12:14:40 -0400 Received: from mga09.intel.com ([134.134.136.24]:53913 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbfDKQOj (ORCPT ); Thu, 11 Apr 2019 12:14:39 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 09:14:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,338,1549958400"; d="scan'208";a="130534340" Received: from jbrandeb-mobl2.amr.corp.intel.com (HELO localhost) ([10.252.136.107]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 09:14:39 -0700 Date: Thu, 11 Apr 2019 09:14:38 -0700 From: Jesse Brandeburg To: Kevin Locke Cc: "John W. Linville" , , jesse.brandeburg@intel.com Subject: Re: [PATCH] ethtool: Add bash-completion script Message-ID: <20190411091438.00007a81@intel.com> In-Reply-To: References: X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, 7 Apr 2019 20:19:37 -0600 Kevin Locke wrote: > To aid users constructing a valid ethtool invocation, create a > [bash-completion] script to provide [programmable completion] of ethtool > arguments. It supports all current command options. > > The script is placed in shell-completion/bash and installed to > completionsdir from pkg-config for bash-completion, similar to [kmod]. > It requires pkg-config 0.18 or later to be installed on the build > system which runs aclocal (for the PKG_CHECK_MODULES m4 macro). > > Note: In [scop/bash-completion#289] the bash-completion maintainer > suggested shipping this completion with ethtool rather than > bash-completion, due to assumptions about the ethtool command-line > format made by the script. That pull request also contains an extensive > test suite in Python which is not included in this commit, but may be > ported to a format suitable for inclusion if there is sufficient > interest and agreement about how to achieve that. > > [bash-completion]: https://github.com/scop/bash-completion > [programmable completion]: https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html > [kmod]: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/tree/ > [scop/bash-completion#289]: https://github.com/scop/bash-completion/pull/289 > > Signed-off-by: Kevin Locke Thank you! I think this is super useful, and I agree FWIW that it should be part of ethtool. I suspect that it needs to be installed by any package manager as part of ethtool install, into the right directory. Could be a followup patch? And the only (minor) complaint I have about your patch is that the commit message doesn't show how to install it (basically just copy ethtool file from this patch to f.e. /usr/share/bash-completion/completions/) I did a quick touch test of it and it seemed to be completing ethtool commands which made me really happy, especially the network interface names which are so long. Reviewed-by: Jesse Brandeburg And now I'm going to go and tell everyone I work with about this patch. :-)