bug-bash
[Top][All Lists]
Advanced

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

Re: still having cursor problems on MacOSX Terminal and iTerm


From: dearvoid
Subject: Re: still having cursor problems on MacOSX Terminal and iTerm
Date: Fri, 22 Dec 2006 18:34:22 +0800

On 12/22/06, sci-fi@hush.ai <sci-fi@hush.ai> wrote:


I've seen visual glitches like this for so long, I think they
might be more to do with Apple than with GNU-&-company.

I've applied all nine official patches thus-far to bash-3.2 and
the one official patch to readline-5.2, have pointed their
builds to use my build of ncurses-5.5+patches residing in
/usr/local, have the latest versions (some from cvs/svn) for
almost every other open source project (hundreds) I also put
into /usr/local including iconv/intl, gettext, etc.

I like to use hilighting for the bash prompt, and put the
settings in /etc/bashrc.  I was using this one-line PS1 string:
PS1='\e[0;7m\h[\w]\u\$\e[0m '
but decided to start using a two-line string:
PS1='\e[0;7m\h[\w]\n\u\$\e[0m '
.                 ^^
so we could see long 'pwd's.  ;)

In PS1 we must enclose sequence of non-printing characters within \[ and \],
just like this:

$ PS1='\[\e[0;7m\]\h[\w]\u\$\[\e[0m\] '

For details you can refer to Bash's man page.


reply via email to

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