Public bug reported:
Hello,
two-line summary:
I propose to create a /etc/bash.d/ directory for files that need to be read
when starting a non-login shell.
longer version:
Files in /etc/profile.d/ are sourced for _login shells_ (in other words:
whenever /etc/profile is read). That works fine for setting environment
variables (which are exported to child processes, including shells), but
breaks for things like bash completion because those aren't inherited to
non-login shells.
If you don't know the difference:
su - $USER # will give you a login shell
bash # will give you a non-login shell
If you open a "normal" (non-login) shell, the files in /etc/profile.d/
are _not_ read. This means that various bash completions are not
available.
I propose to create a /etc/bash.d/ directory for files that need to be
read when starting a non-login shell.
This adds the advantage of having a *.d directory where you can just
drop in a file and it is used.
I never used a different shell, therefore I have no idea if we'll need a
/etc/tcsh.d/, /etc/ash.d/, /etc/zsh.d/, ... directory - feedback on this
(and of course on the /etc/bash.d/ proposal) is welcome ;-)
** Affects: bash (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1105645
Title:
/etc/bash.d
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1105645/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs