1 |
Dnia 2013-09-09, o godz. 12:50:03 |
2 |
Samuli Suominen <ssuominen@g.o> napisał(a): |
3 |
|
4 |
> On 09/09/13 12:24, Michał Górny wrote: |
5 |
> > Do I have to say it's pretty far from professional to commit it |
6 |
> > half-working, with no clear information how to proceed, neither for |
7 |
> > users nor for developers? As far as I can see, there were mostly either |
8 |
> > random patches or random bugs, with no clear generic guidelines. |
9 |
> > |
10 |
> > I have enough projects on my back but I guess I'll end up carrying this |
11 |
> > mess if nobody bothers to do so. |
12 |
> > |
13 |
> > |
14 |
> > For future reference, I so far know the following: |
15 |
> > |
16 |
> > 1. bash supports two directories for completions: completionsdir |
17 |
> > (/usr/.../completions) and compatdir (/etc). gentoo added a third |
18 |
> > directory that i will call gentoodir (/usr/.../bash-completion). |
19 |
> > |
20 |
> > 2. bash sources all files in compatdir (at start?). |
21 |
> > |
22 |
> > 3. eselect used to symlink stuff from $gentoodir to $compatdir to |
23 |
> > enable completions. therefore, all enabled stuff polluted |
24 |
> > the environment all the time. |
25 |
> > |
26 |
> > 4. files in completionsdir are sourced when command matching filename |
27 |
> > is typed in. that is 'foo <tab>' -> "$completionsdir/foo" is sourced. |
28 |
> > |
29 |
> > 5. in order for completionsdir to work, |
30 |
> > /usr/share/bash-completion/bash_completion must be sourced first. |
31 |
> > (is this just me? is this something to be done in global bashrc?) |
32 |
> |
33 |
> yes, that's the way to enable bash completion support per user just like |
34 |
> documented in top of README |
35 |
> |
36 |
> > Aside to the above, what needs to be answered: |
37 |
> > |
38 |
> > 1. how to properly disable completions the 'new way'? |
39 |
> |
40 |
> something like |
41 |
> http://blog.onetechnical.com/2012/06/19/disable-bash-autocompletion-on-ubunt/ |
42 |
> should be replicated at wiki.gentoo.org |
43 |
|
44 |
Did you actually try that? |
45 |
|
46 |
Trying plain: |
47 |
|
48 |
complete -r git |
49 |
|
50 |
it removes git completion indeed. But when I type 'git <tab>', it is |
51 |
loaded back :). |
52 |
|
53 |
> > 2. do we want to support adding stuff to $compatdir? |
54 |
> |
55 |
> why not, does something need this? |
56 |
|
57 |
I don't know. Maybe. Like git-prompt, though I'd rather move that out |
58 |
of topic of bash-completion, maybe instead some kind of bashrc.d. |
59 |
|
60 |
> > what do we do with completions that don't fit $completionsdir? |
61 |
> |
62 |
> like? some old format of bash completion files that don't work if not |
63 |
> sourced directly? |
64 |
> should be treated like other bugs, ie. treat it as a bug, report |
65 |
> upstream of the file, patch the file |
66 |
> if not possible, put them in the compatdir? |
67 |
> |
68 |
> didn't tackle the compatdir issue yet because nothing obvious needed it, |
69 |
> surely adding extra eclass code is on need-basis... :/ |
70 |
|
71 |
Ok then, will report bugs. |
72 |
|
73 |
-- |
74 |
Best regards, |
75 |
Michał Górny |