[Bug 1105645] [NEW] /etc/bash.d
Alba Nader
sharepass12 at yahoo.com
Sat Jan 26 02:43:19 UTC 2013
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
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1105645
Title:
/etc/bash.d
Status in “bash” package in Ubuntu:
New
Bug description:
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 ;-)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1105645/+subscriptions
More information about the foundations-bugs
mailing list