Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278668 - app-shells/bash: /etc/bash/bashrc.d request?
Summary: app-shells/bash: /etc/bash/bashrc.d request?
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-22 11:40 UTC by Hongjiu Zhang
Modified: 2009-08-14 07:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongjiu Zhang 2009-07-22 11:40:20 UTC
Currently, if I want to emerge app-shells/bash-completion, I should  add . /etc/profile.d/bash-completion.sh in /etc/bash/bashrc in order to get global application. Will it be possible to add a /etc/bash/bashrc.d as hooks. Then app-shells/* can take advantage to apply themselves to non-login shells.

something add to /etc/bash/bashrc like:
for x in /etc/bash/bashrc.d/*
do
  . $x
done

(i know it is badly coded since i learn little about bash...)

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2009-07-26 17:24:21 UTC
packages should never automatically install things into /etc/profile.d/, and the same logic applies to /etc/bash/bashrc.d/.  installation of a package is not an automatic opt-in.
Comment 2 Hongjiu Zhang 2009-07-30 10:50:07 UTC
Well, in fact, bash-completion and java-config does. They have file in /etc/profile.d. Do you mean these are either workarounds or deprecated?

Thank you for your reply.
Comment 3 SpanKY gentoo-dev 2009-08-14 07:38:24 UTC
what i meant was installing and automatically enabling.  bash-completion does not.  it installs a hook script, but it doesnt enable things unless the user has enabled it.

change your console to start a login shell and it'll go through the normal /etc/profile* setup