[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coloured prompt mangles long input lines
From: |
yap_noel |
Subject: |
Re: Coloured prompt mangles long input lines |
Date: |
Tue, 6 Nov 2001 09:19:06 -0500 |
IIRC, you need to wrap the non-printed characters with \[ and \].
Noel
michal@logix. To: bug-bash@gnu.org
cz cc:
Sent by: Subject: Coloured prompt mangles
long input lines
bug-bash-admi
n@gnu.org
11/06/2001
07:51 AM
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE
='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat'
-DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I.
-I./include -I./lib -I/usr/include -O2 -march=i386 -mcpu=i686
uname output: Linux broucek.logix.cz 2.4.13-ac3 #2 Tue Nov 6 08:53:53 CET
2001 i586 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.05
Patch Level: 8
Release Status: release
Description:
When PS1 is set to produce coloured output via ANSI escape
sequences, then long lines (longer than screen width) are
wrapped and rewrite the prompt itself. It behaves like there be
'\r' at the end instead of '\n'
Repeat-By:
$ export PS1='\e[1;31m\w\e[0m\$ '
$ write looooooooong looooong line
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-bash
This communication is for informational purposes only. It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.