[Bug 589496] Re: bash --rcfile does not behave as documented
mpb
mpb.mail at gmail.com
Wed Sep 28 18:45:40 UTC 2016
[TL;DR: Bash developer Chet Ramey claimed in 2015 that this is a
documentation bug. Then, in 2016, a documentation patch has been
proposed to (and possibly accepted by?) Debian.]
On 16 Sep 2016, Chet Ramey released version 4.4 of bash. This inspired
me to check and see if this long standing issue has been fixed. Here is
what I learned.
Debian bug # 343673 from 2005.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343673
Debian bug # 516152 from 2009.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516152
GNU Savannah bug #107950 from 2012.
https://savannah.gnu.org/support/index.php?107950
In 2015, Chet Ramey commented on the above Savannah bug report:
"Debian made that documentation error. If you compile with -DSYS_BASHRC,
it's always executed, as is ~/.bashrc (or the file specified with
--rcfile)"
In other words, Ramey claims this is a documentation bug. I do not know
if -DSYS_BASHRC has only the one above effect, or if it also has other
effects as well.
In 2016, Tom Levy posted the following comment on Debian bug #516152
(see above link).
"Convincing Chet that the behaviour in Debian's documentation is preferable
to the current behaviour seems hard considering his 3-year response time. I propose changing the documentation."
Levy also included a patch to Debian's bash man page. The patch is
here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=516152;filename
=man-bashrc.diff.patch;msg=27
I am not an expert on the Debian development process, so I am unable to
determine if the patch has been accepted by Debian.
The patch does not appear to have been applied to the following file,
but this might not be the correct place to look for the patch. (Again,
I am not a Debian expert.)
http://sources.debian.net/src/bash/4.4-1/doc/bash.1/
--
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/589496
Title:
bash --rcfile does not behave as documented
Status in bash package in Ubuntu:
Confirmed
Status in bash package in Debian:
New
Bug description:
Binary package hint: bash
the bash manpage says this about --rcfile
--rcfile file
Execute commands from file instead of the system wide initial‐
ization file /etc/bash.bashrc and the standard personal initial‐
ization file ~/.bashrc if the shell is interactive (see INVOCA‐
TION below).
under INVOCATION it says
When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
these files exist. This may be inhibited by using the --norc option.
The --rcfile file option will force bash to read and execute commands
from file instead of /etc/bash.bashrc and ~/.bashrc.
but when i execute
$ bash --rcfile somercfilewhichreallydoesexistandisreadableandall
it will still read /etc/bash/bashrc (can be verified by adding --verbose)
using lucid with bash 4.1-2ubuntu3
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/589496/+subscriptions
More information about the foundations-bugs
mailing list