Jim <[EMAIL PROTECTED]> writes:
> Hal wrote:
>
>
>> > Hi all.....I have added some lines to my .bashrc in
>> > an attempt to make an alias and change my prompt. Though
>> > I completely log out and back in, the changes do not take
>> > effect (but xemacs does work when I type "xemacs").
>>
>>What does your ~/.bash_profile look like? It should source ~/.bashrc.
>>
>
>
>
> Thanks Hal. The ~/.bash_profile does source ~/.bashrc I think, it has
> an if statement which, if there are functions/commands in ~/.bashrc,
> calls/executes them. I'm in windows at the moment but I did look at it.
>
> Any other ideas?
Just a thought:
If you have these lines in .bashrc:
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
And your alias and PS1 setting comes before it, and further, if
something in /etc/bashrc overrides it or something /etc/bashrc
sources, overrides it. That would cancel out your setting.
This may sound like a bizarre happenstance, but its happened here
more than once, maybe with different files.
Here is the diffintive way to discover what is happening:
At the top and bottom respectively of each of these files, put:
in /etc/profile
echo "$PS1 .. /etc/profile top"
echo "$PS1 .. /etc/profile bottom"
in /etc/basrhc
echo "$PS1 .. /etc/bashrc top"
echo "$PS1 .. /etc/basrhc bottom"
ditto in ~/.bash_profile and ~/.bashrc
But be sure to put the correct file names, or it could get confusing.
Going top and bottom will show if a sourced file changes anything.
With all this in place, either type `login' at a prompt, or actually
log out, then back in. Anther way to get a full login without
logging out is to ssh $LOGNAME@localhost
The print out should give some clues what is happening and in which
order.
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list