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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 7F097C10F13 for ; Thu, 11 Apr 2019 16:47:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52A902146F for ; Thu, 11 Apr 2019 16:47:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbfDKQrJ (ORCPT ); Thu, 11 Apr 2019 12:47:09 -0400 Received: from vulcan.kevinlocke.name ([107.191.43.88]:36610 "EHLO vulcan.kevinlocke.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbfDKQrJ (ORCPT ); Thu, 11 Apr 2019 12:47:09 -0400 Received: from kevinolos (unknown [71.15.201.20]) (Authenticated sender: kevin@kevinlocke.name) by vulcan.kevinlocke.name (Postfix) with ESMTPSA id 90E7FE7EE01; Thu, 11 Apr 2019 16:47:06 +0000 (UTC) Received: by kevinolos (Postfix, from userid 1000) id 119DA130043B; Thu, 11 Apr 2019 10:47:04 -0600 (MDT) Date: Thu, 11 Apr 2019 10:47:04 -0600 From: Kevin Locke To: Jesse Brandeburg Cc: "John W. Linville" , netdev@vger.kernel.org Subject: Re: [PATCH] ethtool: Add bash-completion script Message-ID: <20190411164703.GA5716@kevinolos> Mail-Followup-To: Kevin Locke , Jesse Brandeburg , "John W. Linville" , netdev@vger.kernel.org References: <20190411091438.00007a81@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190411091438.00007a81@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 2019-04-11 at 09:14 -0700, Jesse Brandeburg wrote: > 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). >> >> [...] > > 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? Great! Glad to hear it. Patched configure.ac and Makefile.am install the script to `pkg-config --variable=completionsdir bash-completion` (with fallback to $datadir/bash-completion/completions) by default. It can be disabled by passing --without-bash-completion-dir or overridden by --with-bash-completion-dir=$anypath. I would expect most distribution packages would install it by default, but if there are followup patches (for ethtool or to the distributions), I'd be happy to submit those as well. > 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/) Good point. I will document the install process and the configure arguments mentioned above and send an updated patch shortly. > 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. :-) Wonderful! I'm very glad to hear that you found it useful and I hope your colleagues appreciate it as well. Let me know if you or they find any improvements that I can include in a future version of the patch. Thanks for taking the time to review it! Best, Kevin