bug-bash
[Top][All Lists]
Advanced

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

Prompt - cursor position - command history display problem


From: Timothy James Erlenmeyer
Subject: Prompt - cursor position - command history display problem
Date: Sat, 17 Oct 2009 22:51:13 -0700
User-agent: RoundCube Webmail/0.3-RC1.UCB3


Configuration Information [Automatically generated, do not
change]:

Machine: x86_64

OS: linux-gnu

Compiler: gcc

Compilation
CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu'
-DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown'
-DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -O2

uname output: Linux
cyclops4 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:47:07 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux

Machine Type: x86_64-unknown-linux-gnu

Bash
Version: 4.0

Patch Level: 28

Release Status: release

Description:

With
a color prompt, long directory names, and/or long command lines, scrolling
through the command history often causes the cursor to be in the wrong
position, the prompt to loose color and remnants of previous long commands
to remain on the line with short commands.

Repeat-By:

* This line is
placed in ~/.bashrc:

PS1='[e[31;2m]w$[e[0m] '

* A terminal window is
opened with system default parameters (xterm and gnome-terminal have the
same behavior).

* xwininfo indicates that its geometry is: 80x24-80-85
(the window width changes the prompt-cursor-command line behavior).

*The
following is one of many sequences that cause the problem.

* The following
commands have been executed (prompts are shown here as the text from first
character to the first $) :

~$ pwd|wc -c

14 (******* response to
command*********)

~$ mkdir -p
/tmp/Classification_Parameter_Estimation_and_State_Estimation_An_Engineering_Approach_Using_MATLAB/

~$
cd
/tmp/Classification_Parameter_Estimation_and_State_Estimation_An_Engineering_Approach_Using_MATLAB/

**********
Now Command History is Scrolled Back With Up Arrow.
Result:

/tmp/Classification_Parameter_Estimation_and_State_Estimation_An_Engineering_Approach_Using_MATLAB$
pwd|wc -cwd|wc -c

99 (******* response to command*********) ****Remnant of
another command line (above) --^



reply via email to

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