Dnia 2013-09-09, o godz. 12:50:03
Samuli Suominen <[email protected]> napisał(a):

> On 09/09/13 12:24, Michał Górny wrote:
> > Do I have to say it's pretty far from professional to commit it
> > half-working, with no clear information how to proceed, neither for
> > users nor for developers? As far as I can see, there were mostly either
> > random patches or random bugs, with no clear generic guidelines.
> >
> > I have enough projects on my back but I guess I'll end up carrying this
> > mess if nobody bothers to do so.
> >
> >
> > For future reference, I so far know the following:
> >
> > 1. bash supports two directories for completions: completionsdir
> > (/usr/.../completions) and compatdir (/etc). gentoo added a third
> > directory that i will call gentoodir (/usr/.../bash-completion).
> >
> > 2. bash sources all files in compatdir (at start?).
> >
> > 3. eselect used to symlink stuff from $gentoodir to $compatdir to
> > enable completions. therefore, all enabled stuff polluted
> > the environment all the time.
> >
> > 4. files in completionsdir are sourced when command matching filename
> > is typed in. that is 'foo <tab>' -> "$completionsdir/foo" is sourced.
> >
> > 5. in order for completionsdir to work,
> > /usr/share/bash-completion/bash_completion must be sourced first.
> > (is this just me? is this something to be done in global bashrc?)
> 
> yes, that's the way to enable bash completion support per user just like 
> documented in top of README
> 
> > Aside to the above, what needs to be answered:
> >
> > 1. how to properly disable completions the 'new way'?
> 
> something like
> http://blog.onetechnical.com/2012/06/19/disable-bash-autocompletion-on-ubunt/
> should be replicated at wiki.gentoo.org

Did you actually try that?

Trying plain:

  complete -r git

it removes git completion indeed. But when I type 'git <tab>', it is
loaded back :).

> > 2. do we want to support adding stuff to $compatdir?
> 
> why not, does something need this?

I don't know. Maybe. Like git-prompt, though I'd rather move that out
of topic of bash-completion, maybe instead some kind of bashrc.d.

> > what do we do with completions that don't fit $completionsdir?
> 
> like? some old format of bash completion files that don't work if not 
> sourced directly?
> should be treated like other bugs, ie. treat it as a bug, report 
> upstream of the file, patch the file
> if not possible, put them in the compatdir?
> 
> didn't tackle the compatdir issue yet because nothing obvious needed it, 
> surely adding extra eclass code is on need-basis... :/

Ok then, will report bugs.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to