LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   customizing bash prompt? (https://www.linuxquestions.org/questions/mandriva-30/customizing-bash-prompt-155200/)

sunshine 03-08-2004 09:00 PM

customizing bash prompt?
 
I'm trying to customize my bash prompt for konsole/kterm. This is the the coding for the way I want it:

PS1="\e[32;1m\]\u@\H \W#\[\e[0m\]"

For some reason when I close the session it doesn't come up this way. Whats wrong...
here is a copy of my .bash_profile and .bashrc files from my home dir.

==============================================
My .bash_profile:
==============================================
source ~/.bashrc
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

==============================================
My .bashrc file:
==============================================
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

if [ "$TERM" = "linux" ]
then
#we're on the system console or maybe telnetting in
export PS1="\e[32;1m\]\u@\H \W#\[\e[0m\]"
else
#we're not on the console, assume an xterm
export PS1="\e[32;1m\]\u@\H \W#\[\e[0m\]"
fi
==============================================

Whats wrong here?

sunshine 03-08-2004 09:18 PM

I have it, just needed to put this at the end of the .bash_profile -rather than the middle.

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi


All times are GMT -5. The time now is 11:52 PM.