From nobody@FreeBSD.ORG  Wed Sep  6 15:56:27 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id E015F37B424; Wed,  6 Sep 2000 15:56:27 -0700 (PDT)
Message-Id: <20000906225627.E015F37B424@hub.freebsd.org>
Date: Wed,  6 Sep 2000 15:56:27 -0700 (PDT)
From: eddier@home.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Annoying little bug using   ls -G   with colorized prompts.
X-Send-Pr-Version: www-1.0

>Number:         21086
>Category:       bin
>Synopsis:       Annoying little bug using   ls -G   with colorized prompts.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 06 16:00:00 PDT 2000
>Closed-Date:    Fri Jun 29 06:24:58 PDT 2001
>Last-Modified:  Fri Jun 29 06:25:32 PDT 2001
>Originator:     Eddie Rohwedder
>Release:        4.1-RELEASE
>Organization:
>Environment:
4.1-RELEASE FreeBSD 4.1-RELEASE #0: Wed Sep  6 13:34:46 PDT 2000
>Description:
When using "ls -G" while also using colored bash prompts, if the first file(s) outputted are not to be colorized, they take on the bash prompt color until reaching a file that does have color. Then the folowing non-colored files take on the defualt white. In other words, there is no *initial* setting of the default color.
I know it's a tiny thing and you have better things to worry about, but...  :)
>How-To-Repeat:
Add a colorized bash prompt.
Do a ls -G
(Make sure that the directory's first few files have no color attribute.)
>Fix:
Easy fix is to add 
  endcolor(0);
to parsecolors() in src/bin/ls/print.c
This forces an initial setting of the color, once, before displaying any files. Looks like you tried to fix it with some signal() code just before the call to pasrecolors() but it didn't seem to fix it.

>Release-Note:
>Audit-Trail:

From: Gregory Bond <gnb@itga.com.au>
To: eddier@home.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/21086: Annoying little bug using ls -G with colorized prompts. 
Date: Thu, 07 Sep 2000 11:52:41 +1100

 > When using "ls -G" while also using colored bash prompts, if the first file(s
 > ) outputted are not to be colorized, they take on the bash prompt color until
 >  reaching a file that does have color.
 
 Surely this is a bug in the way the bash color prompt is implemented (I assume 
 you're doing it with funky escape codes in PS1).  It should leave the terminal 
 in the default color mode at the end of the pormpt, rather than rely on all 
 the other color-using programs to fix it.
 
 
 
 
Responsible-Changed-From-To: freebsd-bugs->joe 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Fri Sep 8 06:29:34 PDT 2000 
Responsible-Changed-Why:  
Joe, could you check out whether the problem lies in ls(1) 
or bash? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21086 
State-Changed-From-To: open->closed 
State-Changed-By: joe 
State-Changed-When: Fri Jun 29 06:24:58 PDT 2001 
State-Changed-Why:  
Timeout on feedback.  If this is still a problem please open 
another PR. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21086 
>Unformatted:
