bug-bash
[Top][All Lists]
Advanced

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

Color prompt issues - debian lenny - UTF-8


From: Chris Jones
Subject: Color prompt issues - debian lenny - UTF-8
Date: Mon, 29 Jun 2009 19:16:08 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

Not sure whether this is a bug in my version of bash, but I copied over
my colored PS1 prompts from debian etch - regular user & root - and some
convenient keyboard actions are misbehaving. After retrieving a command
from the history via a CTRL-R, an ensuing CTRL-A moves the cursor to
somewhere in the middle of the prompt and CTRL-E is short of the
retrieved command's end by some ten characters.

The main difference between debian etch and debian lenny in this respect
appears to be that the default locale is now unicode (en_US.UTF-8).

I remember seeing other posts relative to this type of problem, possibly
on this list, but searching online, I could not find anything that
explained what is happening or provided a workaround/resolution.

Debian lenny has the following installed:

  $ bash --version
  GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
  Copyright (C) 2007 Free Software Foundation, Inc.

My guess is that the non-printable characters in my bash prompt that
switch colors interfere with bash's notion of the prompt's length? 

I removed the color escape sequences from my user's bash prompt via a:

$ PS1="[\$(date +%T)][\u@\h:\w]\\$ "

.. and everything was back to "normal".

Seems to confirm my above speculations.

In any case it's just a minor annoyance that I can live with for now,
but all the same, I would be grateful if anyone could provide some
useful pointers to documentation or bug reports that would help
understand what is happening, and possibly a workaround. 

If this is really a bug in the version of bash that I am running, I will
eventually upgrade to a version of bash where the issue of fixed, so
please let me know if this an option.

Thanks,

CJ




reply via email to

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