Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375043 - sys-apps/coreutils: add "TERM screen.Eterm" to dircolors db
Summary: sys-apps/coreutils: add "TERM screen.Eterm" to dircolors db
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 07:56 UTC by Kfir Lavi
Modified: 2011-07-20 10:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/bash/bashrc TERM is now interpretad correctly for color prompt. (bashrc.colors.patch,587 bytes, text/plain)
2011-07-13 07:58 UTC, Kfir Lavi
Details
Just corrected the order of the files in the patch, so it can be applied (bashrc.colors.patch,587 bytes, patch)
2011-07-13 08:01 UTC, Kfir Lavi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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