On Apr 8, 7:16 am, Greg Wooledge <wool...@eeg.ccf.org> wrote:
> On Tue, Apr 07, 2009 at 11:04:58PM -0700, Special Sauce wrote:
>
> > [an...@nobby-nobbs ~]$ echo $PS1
> > [\[\e[28;1m\...@\h\[ \e[0m\]\w]$
>
>                     ^^^
> The space after \[ is not correct.  You're sending a space to the terminal
> (or possibly more than one space -- since you didn't quote "$PS1" when
> you expanded it, we can't tell), but you're telling bash that it isn't
> moving the cursor (because you have \[ before it).
>
> Whether that's causing your problems, I can't say, but it's definitely
> not right.

Didn't know that, but, like I said, works fine with bash 3.xx

Here is a minimalist start:

[an...@nobby-nobbs ~/bucket/bash-4.0]$ ./bash --version
GNU bash, version 4.0.17(1)-release (x86_64-unknown-linux-gnu)
...
[an...@nobby-nobbs ~/bucket/bash-4.0]$ ./bash -v
export PS1="[\[\e[28;1m\...@\h \[\e[0m\]\w]\$ "
[an...@nobby-nobbs ~/bucket/bash-4.0]$

Now the cursor is on top of the '/' between bash and bucket.
If I cd to my home directory and try to recreate the problem the
cursor is on top of the '-' in my hostname.
Maybe its always a fixed number of characters before the end of the
prompt... but why would that be happening?

Reply via email to