Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 375043

Summary: sys-apps/coreutils: add "TERM screen.Eterm" to dircolors db
Product: Gentoo Linux Reporter: Kfir Lavi <lavi.kfir>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /etc/bash/bashrc TERM is now interpretad correctly for color prompt.
Just corrected the order of the files in the patch, so it can be applied

Description Kfir Lavi 2011-07-13 07:56:38 UTC
Hi,
Here is the patch:
-safe_term=${TERM//[^[:alnum:]]*/}   # sanitize TERM
+safe_term=${TERM//[^[:alnum:]]/?}   # sanitize TERM

Regular terminal: TERM=Eterm
screen terminal: TERM=screen.Eterm

The sanitize line does this:
screen.Eterm -> screen?Eterm
after the patch:
screen.Eterm -> screen
as expected, and now prompt is with colors again. 

Regards,
Kfir

Reproducible: Always
Comment 1 Kfir Lavi 2011-07-13 07:58:11 UTC
Created attachment 279943 [details]
/etc/bash/bashrc TERM is now interpretad correctly for color prompt.
Comment 2 Kfir Lavi 2011-07-13 08:01:02 UTC
Created attachment 279945 [details, diff]
Just corrected the order of the files in the patch, so it can be applied
Comment 3 SpanKY gentoo-dev 2011-07-13 21:22:12 UTC
Comment on attachment 279945 [details, diff]
Just corrected the order of the files in the patch, so it can be applied

sorry, but this patch is wrong.  the current code is correct as we do want to use "screen?Eterm" as our match string.

the point is to match a "TERM screen?Eterm" line against the dircolor db.  if the dircolor db had a "TERM screen.Eterm" line, then you would have gotten colored output.

so bash is working as designed.  what you actually want is to update the coreutils dircolors db to include a "TERM screen.Eterm" line.
Comment 4 Kfir Lavi 2011-07-14 13:35:04 UTC
I now understand the problem:
The 'TERM screen-Eterm' line is missing in /etc/DIR_COLORS
After adding this line, I get back my colorful gentoo prompt. 

Is this a bug for coreutils?

Regards,
Kfir
Comment 5 SpanKY gentoo-dev 2011-07-20 04:00:01 UTC
i sent a patch upstream.  i dont consider this important enough to warrant a rev bump ... sorry.
Comment 6 Kfir Lavi 2011-07-20 10:33:11 UTC
No prolem, thanks for your efforts. 

Regards,
Kfir