[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Color commands in promp cause problems.
From: |
jim joyce |
Subject: |
Color commands in promp cause problems. |
Date: |
Sun, 21 Jan 2001 09:30:43 -0500 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='i386-suse-linux'
-DCONF_VENDOR='suse' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64
-I. -I/usr/include -I. -I./include -I./lib -I/usr/include -O2 -m486
-D_GNU_SOURCE -Wall -pipe
uname output: Linux linux 2.2.16 #1 Wed Aug 2 20:22:26 GMT 2000 i586
unknown
Machine Type: i386-suse-linux
Bash Version: 2.04
Patch Level: 0
Release Status: release
Description:
Inclusion of terminal color commands in PS1 prompt string causes
anomalous behavior
as typed commands are echoed back to terminal or console window.
NORMAL BEHAVIOR:
A long command is echoed back as typed, to the end of the
visible line on the
display window, then the window scrolls up and echoing continues
from the left end
of the next line.
ANOMALOUS BEHAVIOR:
The command is echoed back until a position is reached about
four characters
short of the end of the visible line on the display window; then
the next character
is echoed at the left end of the same line (not scrolled up),
and echoing obliterates
the prompt followed by the beginning of the command. If the
command is really long,
echoing proceeds to the true last character on the line, and
thereafter scrolls down
line after line in the normal fashion.
If I backspace over the line, when the cursor reaches the
left end of the line, the
window scrolls up, the cursor goes with it, and backspacing
continues until the command
is erased. But the image of the command is left on the line
where it was originally
typed. This image then scrolls up normally as new commands are
typed, and does not
interfere with Bash's recognition of the new commands.
Repeat-By:
I want to have two shells active at times: one a root shell, the
other an application
shell. I have made mistakes by not recognizing the differences
in the prompt, and I
thought coloring the prompt would assure my safety.
Fix:
As a workaround, I find that if a nowline is part of the prompt,
the anomalous effect
does not occor. This puts the command line below the prompt of course.
- Color commands in promp cause problems.,
jim joyce <=