[Bug 1105645] Re: /etc/bash.d

Dimitri John Ledkov launchpad at surgut.co.uk
Thu May 8 01:01:52 UTC 2014


bash (4.3-7ubuntu2) utopic; urgency=medium

  * Source profile.d from /etc/bash.bashrc to allow packages ship
    integration hooks into interactive shells, same ones they already ship
    for login shells. (Closes: #675008)
 -- Dimitri John Ledkov <xnox at ubuntu.com>   Wed, 07 May 2014 12:12:04 +0100

** Changed in: bash (Ubuntu)
       Status: New => Fix Released

-- 
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:
  Fix Released

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