Index

Subject : Re: LUG: [SOLVED] Help me spot the problem with PS1 definition

From : Warren Myers <volcimaster@gmail.[redacted]>

Date : Thu, 22 Apr 2010 07:56:30 -0400

Parent


I was under the impression, from having had to do it when I first learned *nix, that the export before PS1 is required. Is it no longer?

WMM

On Wed, Apr 21, 2010 at 18:57, Kevin Hunter < hunteke@earlham.[redacted] > wrote:
At 4:13pm -0400 Wed, 21 Apr 2010, Alex wrote:
> Daniel... for reference... my PS1 line in .bashrc looks like this:
>
> export PS1="\n\[\e[1;32m\]\H \[\e[37m\]| \[\e[31m\]\w \[\e[37m\]|
> \[\e[1;35m\]\t \[\e[4;35m\]\d\n\[\e[0;32m\]\u\[\e[1;37m\] ( \[\e[1;36m\]\! :
> \#\[\e[1;37m\] ) \$ \[\e[0;39m\]"

Heh.  I take you never have to work with a light background?  That's one
reason I opted to use PROMPT_COMMAND, so that I can dynamically change
my prompt.  LIGHTBG=t, and I get a new color palette.

Also, why do you export your PS1?  Do subprocesses need to know what
your prompt looks like?

Kevin



--
Warren Myers
http://warrenmyers.com
http://www.linkedin.com/in/warrenmyers

Replies :