You are not logged in.

#1 2009-07-27 05:28:47

Frostwarrior
Member
Registered: 2009-06-06
Posts: 27

[SOLVED] My prompt ignores the .bashrc file

I tried to customize the bash prompt with this article in the wiki: http://wiki.archlinux.org/index.php/Col … olfman.27s

But it's worthless.
my bashrc:

$ cat .bashrc
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

# Check for an interactive session
[ -z "$PS1" ] && return

alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
PS1='\[\e[0;32m\]\u \[\e[1;34m\]\w \[\e[1;32m\]\$ \[\e[1;37m\] '

source /etc/profile

But:

[frost@euclides ~]$ source .bashrc
[frost@euclides ~]$

Any help please?
Thanks in advance.

Last edited by Frostwarrior (2009-07-27 19:15:24)

Offline

#2 2009-07-27 06:22:31

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: [SOLVED] My prompt ignores the .bashrc file

Because .bash_profile is sourced at login.


See here, http://bbs.archlinux.org/viewtopic.php?id=70910

Last edited by sand_man (2009-07-27 06:23:40)


neutral

Offline

#3 2009-07-27 07:29:21

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: [SOLVED] My prompt ignores the .bashrc file

You're sourcing /etc/profile at the end of your .bashrc, which resets the PS1 (and a load of other stuff).

Offline

#4 2009-07-27 09:31:08

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] My prompt ignores the .bashrc file

Barrucadu wrote:

You're sourcing /etc/profile at the end of your .bashrc, which resets the PS1 (and a load of other stuff).

More specific: If you want to use /etc/profile definitions just put the line at the very top of your .bashrc.


To know or not to know ...
... the questions remain forever.

Offline

#5 2009-07-27 19:15:07

Frostwarrior
Member
Registered: 2009-06-06
Posts: 27

Re: [SOLVED] My prompt ignores the .bashrc file

solved!
Thanks big_smile

Offline

Board footer

Powered by FluxBB