All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin.monnet@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Jamal Hadi Salim <hadi@mojatatu.com>,
	Vincent Jardin <vincent.jardin@6wind.com>,
	netdev@vger.kernel.org
Subject: Re: iproute2: bash completion function for tc
Date: Thu, 28 Apr 2016 14:15:29 +0200	[thread overview]
Message-ID: <5721FEE1.7080807@6wind.com> (raw)
In-Reply-To: <20160427221346.32ec7bcb@samsung9>

Hi Alexei, Stephen,

2016-04-27 (22:13 UTC-0700) ~ Stephen Hemminger:
> On Wed, 27 Apr 2016 20:19:26 -0700
> Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> 
>> On Tue, Apr 26, 2016 at 09:28:17AM +0200, Quentin Monnet wrote:
>>> Hi Jamal, Stephen,
>>>
>>> I searched for a function providing auto-completion for `tc` utility in
>>> bash, but I found none. So I have created one, and I would like share it
>>> with the community. It is available here:
>>> https://github.com/6WIND/tc_bash-completion/blob/master/tc
>>> I would like to make it easily available to tc users, so here is a
>>> twofold request:
>>>
>>> * I do not know where to submit the code. Should I submit here on netdev
>>> for inclusion in iproute2 package, or rather to the bash-completion
>>> repository on GitHub? I feel like it would receive better feedback and
>>> updates if pushed to iproute2. Could you please provide some advice here?
>>> * The completion for `tc` seems to work well; I have tested it with many
>>> commands, but I am no tc expert, and there are probably some cases where
>>> the completion fails to propose the correct choices. I would be really
>>> interested in any feedback/bug reports that you, or anyone on this list
>>> who uses tc, could provide.
>>
>> that looks very interesting.
>> I think making it a part of iproute2 is a good thing.
>> How about installing it into /etc/iproute2/ ?
>> Stephen, any comments?
>>
> 
> I am ok with keeping it in the repository.
> But it would need to be installed in the standard bash directory,
> is that distro dependent?
> 

As far as I know the bash-completion directory is not distro dependent,
but it moved at some point (2011) from /etc/bash_completion.d/ to
/usr/share/bash-completion/completions/. While backward compatibility is
provided with the former location, it is now recommended to use the latter.

So one idea could be to check (in iproute2 Makefile) for existence of
/usr/share/bash-completion/completions/ directory, and if not found to
fall back to /etc/bash_completion.d/. If none is found, use
/usr/share/bash-completion/completions/. Does this seem correct?

  reply	other threads:[~2016-04-28 12:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  7:28 iproute2: bash completion function for tc Quentin Monnet
2016-04-28  3:19 ` Alexei Starovoitov
2016-04-28  5:13   ` Stephen Hemminger
2016-04-28 12:15     ` Quentin Monnet [this message]
2016-04-28 16:53       ` Alexei Starovoitov
2016-04-29  8:27         ` [PATCH iproute2] tc: add bash-completion function Quentin Monnet
2016-05-02 22:14           ` Stephen Hemminger
2016-05-03  7:39             ` [PATCH iproute2 v2] " Quentin Monnet

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=5721FEE1.7080807@6wind.com \
    --to=quentin.monnet@6wind.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=hadi@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vincent.jardin@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.