.bashrc not executed to the end
Bug #160405 reported by
Pekka Jääskeläinen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The ~/.bashrc script is not executed to the end.
I noticed this when upgrading to Gutsy and my custom environment settings at the end of .bashrc didn't
appear anymore in my shell.
I tracked this to
if [ -f /etc/bash_
. /etc/bash_
fi
No code after this block gets executed. If I add those environment settings to the top of the file, it works as expected.
However, I can imagine this breaks a lot of systems in an upgrade.
This is broken also in clean Gutsy installs (no upgrade).
To post a comment you must log in.
Something strange happens here. It gets executed when I start a new shell, but not when I source it:
From the end of my .bashrc:
echo a completion ]; then completion
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_
. /etc/bash_
fi
echo b
visit0r@foo:~$. .bashrc
a
visit0r@foo:~$
visit0r@foo:~$ bash
a
b
visit0r@foo:~$
And even when I relogin to the system it seems to work:
ssh foo
...
a
b
So the problem is only when sourcing the script, it seems.