Bug 435 - ls colored output no longer works properly
Summary: ls colored output no longer works properly
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.14.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-02 11:47 UTC by Teran McKinney
Modified: 2009-07-03 12:20 UTC (History)
1 user (show)

See Also:
Host: i486-pc-linux-gnu
Target: i486-pc-linux-gnu
Build: i486-pc-linux-gnu


Attachments
Fix (1.32 KB, patch)
2009-07-02 12:13 UTC, Denys Vlasenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Teran McKinney 2009-07-02 11:47:08 UTC
Hi,

I recently updated from Busybox 1.13.4 to 1.14.2, and found that ls' color output broke. I have a alias ls='ls --color=auto' in my ~/.bashrc, but also tested with a direct path to ls (/bin/ls) and --color=always, and I continued to get uncolored output. I turned on enable colored ls output by default and it worked just fine. However, ls --color=never did not seem to turn off color. Guessing that this bug should be quite reproducible, but if it's not, I can let you more about my setup. Not sure if it might affect this (specifically the bug, I'm sure it affects the auto setting), but my $TERM is set to rxvt.

Thanks,
Teran
Comment 1 Denys Vlasenko 2009-07-02 12:13:03 UTC
Created attachment 435 [details]
Fix

Please try attached patch
Comment 2 Teran McKinney 2009-07-02 22:18:55 UTC
(In reply to comment #1)
> Created an attachment (id=435) [details]
> Fix
> 
> Please try attached patch
> 

Thanks for the quick response. I'm not using trunk, which I'm guessing you patched against. It did not patch cleanly:

patching file coreutils/ls.c
Hunk #1 FAILED at 144.
1 out of 3 hunks FAILED -- saving rejects to file coreutils/ls.c.rej

Should I try against trunk?

Thanks,
Teran
Comment 3 Denys Vlasenko 2009-07-02 22:38:52 UTC
This is the same fix against 1.14.2:

http://busybox.net/downloads/fixes-1.14.2/busybox-1.14.2-ls.patch
Comment 4 Teran McKinney 2009-07-02 23:35:24 UTC
(In reply to comment #3)
> This is the same fix against 1.14.2:
> 
> http://busybox.net/downloads/fixes-1.14.2/busybox-1.14.2-ls.patch
> 

Thanks, the patch works perfectly :-). One thing though, with colored output by default, --color=none does not work. I haven't tested the trunk patch, but i'm guessing it's effectively the same. I have to mention that I do like coreutil's alternative coloring of world-writeable files, along with ISO 8601 date formatting and think that it might be nice in Busybox. Not sure if that would fit the Busybox scheme of things so well.

Many thanks,
Teran
Comment 5 Denys Vlasenko 2009-07-03 10:23:34 UTC
I updated

http://busybox.net/downloads/fixes-1.14.2/busybox-1.14.2-ls.patch

to fix that too
Comment 6 Teran McKinney 2009-07-03 12:20:13 UTC
(In reply to comment #5)
> I updated
> 
> http://busybox.net/downloads/fixes-1.14.2/busybox-1.14.2-ls.patch
> 
> to fix that too
> 

Thanks, the patch works perfectly :-).

Thank you,
Teran