Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] bash-completion 2: gentoo completion files installed wrong?
Date: Wed, 30 Sep 2015 01:14:17
Message-Id: 560B375E.3010302@gmail.com
In Reply to: [gentoo-user] bash-completion 2: gentoo completion files installed wrong? by Frank Steinmetzger
1 Frank Steinmetzger wrote:
2 > Hello fellows
3 >
4 > I’m trying to teach my bash to complete again. Ever since the upgrade from
5 > v1 to v2 a year ago, I’ve been missing out on it in parts. I had some time
6 > today, so I dug and found out that the central bash completion script that
7 > sits at /usr/share/bash-completion/bash_completion looks in ./completions.
8 > Eselect bashcomp looks in that same directory. However, there are a number
9 > of files in ./ which neither eselect nor bashcomp find. Most notably, many
10 > of Gentoo’s own completions such as eselect are located there:
11 >
12 > /usr/share/bash-completion $ ls completions | wc -l
13 > 729
14 > /usr/share/bash-completion $ eselect bashcomp list | tail -n 1
15 > [729] zramctl *
16 > /usr/share/bash-completion $ ls
17 > bash_completion calibre-debug completions ebook-convert ebook-meta ebuild
18 > epkginfo eselect flaggie glsa-check java-config layman metagen pygmentize
19 > rc-service repoman tmux udisksctl browser-config calibre-server dbus-send
20 > ebook-device ebook-polish ekeyword epm euse gcc-config helpers kmod lrf2lrs
21 > pip quilt rc-status revdep-rebuild tree webapp-config calibre calibre-smtp
22 > distcc-config ebook-edit ebook-viewer emerge equery fetch-ebook-metadata
23 > genlop hg latexmk lrfviewer portageq rc rc-update splat udevadm youtube-dl
24 >
25 > Is this a bug? Or a misconfiguration? Thanks for any hint.
26
27
28 Well, I'm no expert on this but I recall there being a news item on this
29 a while back. Did you miss it? Here it is if you did.
30
31
32
33 2014-11-25-bash-completion-2_1-r90
34 Title bash-completion-2.1-r90
35 Author Michał Górny <mgorny@g.o>
36 Posted 2014-11-25
37 Revision 1
38
39 Starting with app-shells/bash-completion-2.1-r90, the framework used to
40 enable and manage completions in Gentoo is finally changing in order to
41 properly follow upstream design. This has some important implications
42 for our users.
43
44 Firstly, the install location for completions changes to follow upstream
45 default. The completions enabled before the upgrade will continue to
46 work but you may no longer be able to enable or disable completions
47 installed prior to the upgrade. To solve this issue, the packages
48 installing completions need to rebuilt. The following command can be
49 used to automatically rebuild all the relevant packages:
50
51 $ find /usr/share/bash-completion -maxdepth 1 -type f \
52 '!' -name 'bash_completion' -exec emerge -1v {} +
53
54 Secondly, the autoloading support introduced upstream removes the
55 penalties involved with enabling a great number of completions. This
56 allowed us to switch to an opt-out model where all completions installed
57 after the upgrade are enabled by default. Specific completions can be
58 disabled using 'eselect bashcomp disable ...'
59
60 The model change implies that all current selections done using 'eselect
61 bashcomp' can not be properly migrated and will be disregarded when
62 the relevant completion files are built against the new bash-completion
63 version. After rebuilding all the packages providing completion files,
64 you may want to remove the symlinks that were used to configure
65 the previous framework using the following command:
66
67 $ find /etc/bash_completion.d -type l -delete
68
69 Thirdly, we have solved the issue causing bash-completion support to be
70 enabled by default on login shells only. If you needed to explicitly
71 source 'bash_completion' script in bashrc, you can safely remove that
72 code now since system-wide bashrc takes care of loading it.
73
74 Lastly, we would like to explain that USE=bash-completion is being
75 removed from packages for the completions will be installed
76 unconditionally now. However, this will result in some implicit
77 dependencies being removed. Most specifically, users wishing to use
78 bash-completion will have to request app-shells/bash-completion
79 explicitly, e.g.:
80
81 $ emerge -n app-shells/bash-completion
82
83
84
85 Maybe you need to follow some part or all of that to get things back on
86 track???? I haven't had any trouble with mine here tho.
87
88 Dale
89
90 :-) :-)

Replies

Subject Author
Re: [gentoo-user] bash-completion 2: gentoo completion files installed wrong? Frank Steinmetzger <Warp_7@×××.de>