Index

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

From : Jay Goel <jpgoel@ncsu.[redacted]>

Date : Sun, 18 Apr 2010 16:20:42 -0400

Parent


Might you possibly give a sample command which causes the prompt to mess up (and the expect-vs-actual behavior?)

On Sun, Apr 18, 2010 at 3:52 PM, Daniel Underwood < daniel.underwood@ncsu.[redacted] > wrote:
There's something wrong with my bash command prompt.  The prompt looks
fine initially, but screws up when a long command is entered (among
other things).  It's probably something like a missing bracket, but I
can't figure out what's wrong.  Can you spot any problems with the
definition given below?

PS1='[\u@\[\e[0;31m\h\e[0m]\]:\W\$ '

I'd appreciate any help/suggestions with this.  It has been driving me
crazy! :)

TIA,
Daniel
--
Daniel Underwood
North Carolina State University
Graduate Student - Operations Research
email: daniel.underwood@ncsu.[redacted]
phone: XXX.302.3291
web: http://www4.ncsu.edu/~djunderw/



Replies :