Subject: Re: Terminal problem
To: Ivan Kanis <banana@tadpolecomputer.co.uk>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 07/07/2005 09:32:59
It's actually just repeating whatever the last character is.
fester:~$>>
if you do:
export PS1=3D'\[\033[01;35m\]\h\[\033[00m\]:\w\$>'

However, it doesn't mess up with a newline in there, so:
export PS1=3D'\[\033[01;35m\]\h\[\033[00m\]:\w\n\$'
looks pretty cool.  :)
You can also add any special escape to fix it, like the time, or a
blank escape like this:
export PS1=3D'\[\033[01;35m\]\H\[\033[00m\]:\w\e\$'
(Notice the \e before the \$)

And, it will actually delete the extra $ if you mess with the current
line enough.  (scroll through the history a little bit and then go
back to blank)

Either way, this is probably a bug in the termcap.  Cursor positioning
or something?  I really have no idea.  You can start using \e to
update your window title and stuff anyway.  Good luck.

On 7/7/05, Ivan Kanis <banana@tadpolecomputer.co.uk> wrote:
> Hi, I am running NetBSD 3.0_BETA and bash 3.00.16.
>=20
> I login in an xterm and TERM is set to xterm. I am puzzled by the
> following problem:
>=20
> PS1=3D'\[\033[01;35m\]\h\[\033[00m\]:\w\$'
>=20
> Yields
>=20
> hostname:~$$
>=20
> There should be only one $. The escape sequence are generic ansi to
> make the hostname purple.
>=20
> export TERM=3Dvt100
>=20
> Fixes the problem. It looks like a termcap problem to me. It works on
> Linux and Solaris. Any idea on how to fix it? I use the vt100 as a work
> around.
>=20
> Kind regards,