[262] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Color bash prompt messes up command-line editing: ls --color does too

daemon@ATHENA.MIT.EDU (Simon J Mudd)
Mon Oct 21 18:45:11 1996

Date: Mon, 21 Oct 1996 19:39:31 +0200
From: Simon J Mudd <sjmudd@phoenix.ea4els.ampr.org>
To: redhat-list@redhat.com
In-Reply-To: <199610210252.WAA17661@simile.cc.columbia.edu>
Reply-To: sjmudd@bitmailer.net
Resent-From: redhat-list@redhat.com

In article <199610210252.WAA17661@simile.cc.columbia.edu>, you wrote:
> In my ~/.bashrc file, I have
> 
> PS1='[\u@\h $PWD] \$ '
> 
> To get me a colorized shell prompt.  However, I find this causes many
> peculiar problems when editing command linnes--bizzarely-placed
> duplicate prompts, remnants of ANSI display codes, etc.  Any ideas
> without getting rid of color?

I get a similar problem with ls, using the alias ls='ls --color', but when
piping the output.  Eg. 'ls /usr/doc' works ok, but 'ls /usr/doc |less'
comes out like the following:  (ESC is in inverse video.)

ESC[01;34mElectricFence-2.0.5-2ESC[00m
ESC[01;34mFAQESC[00m
ESC[01;34mHOWTOESC[00m
ESC[01;34mHTMLESC[00m
ESC[01;34mSysVinit-2.64-2ESC[00m
ESC[01;34mXconfigurator-2.4-3ESC[00m
ESC[01;34mabuse-1.10-5ESC[00m
ESC[01;34madjtimex-1.2-4ESC[00m
ESC[01;34mamd-920824upl102-5ESC[00m
ESC[01;34marchie-1.4.1-2ESC[00m
ESC[01;34mbash-1.14.7-1ESC[00m
ESC[01;34mbasic-1.20-7ESC[00m
ESC[01;34mbinutils-2.7.0.2-4ESC[00m
ESC[01;34mbm2font-3.0-6ESC[00m
ESC[01;34mbootpc-050-2ESC[00m
ESC[01;34mcolour-yahtzee-1.0-3ESC[00m
ESC[01;34mcpio-2.4.2-3ESC[00m
ESC[01;34mcproto-4.4-2ESC[00m
ESC[01;34mcvs-1.7-3ESC[00m
ESC[01;34mcxhextris-1.0-4ESC[00m
ESC[01;34mdiald-0.14-1ESC[00m
ESC[01;34mdialog-0.6-7ESC[00m
ESC[01;34mdiffutils-2.7-5ESC[00m
ESC[01;34mdoom-1.8-6ESC[00m

Can this be fixed?
-- 
regards,

Simon J Mudd, Madrid, SPAIN
e-mail: sjmudd@bitmailer.net


--
  PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-HOWTO 
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post