bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash 4 cursor in my prompt


From: Tony Leding
Subject: Re: Bash 4 cursor in my prompt
Date: Wed, 20 May 2009 09:24:55 -0700
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070807)

yeah - the issue on my system was that I was not using the start-of and end-of 
color characters properly - for example:


===== ORIGINAL PS1 STRING =====
export PS1="[\e[1;36m\w @ \h\e[m] \n[\e[1;35m\t \u\e[m] > "

===== NEW PS1 STRING =====
export PS1="[\[\033[1;36m\]\w @ \h\[\033[0m]\n\][\[\033[1;35m\t 
\u\]\[\033[0m\]] > "



Note that I removed the "\033" entries and also added the "[\e[" & "[\e[m" 
control characters.  Once I made these slight changes, it solved the issue...

-- 

***********************************************************
*                      |                                  *
*                      | Tony Leding                      *
*     |         |      | Software Engineer, Cisco Systems *
*    :|:       :|:     | CMTS-BU / Cable System Test      *
*   :|||:     :|||:    | Office: 408-525-2995             *
* .:|||||:...:|||||:.  | Mobile: 925-708-9757             *
*                      | E-mail: tleding@cisco.com        *
*   Cisco Systems      |                                  *
***********************************************************


Chet Ramey wrote:
>> This ever get solved?  I had the same issue in bash v3.2x and the root cause 
>> was the formatting.
> 
> If it's the one I'm thinking of, nobody was ever able to reproduce it.
> 
> Chet
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]