Ticket #8993: 0001-bash_profile-set-ls-color-alias-to-auto.patch

File 0001-bash_profile-set-ls-color-alias-to-auto.patch, 1.0 KB (added by Prasad, 12 years ago)
  • data/etc/profile

    From dcf2de56444a76aff007c2191dd261c52ba7335e Mon Sep 17 00:00:00 2001
    From: Prasad Joshi <prasadjoshi.linux@gmail.com>
    Date: Sun, 16 Sep 2012 08:59:42 +0530
    Subject: [PATCH] bash_profile: set ls color alias to auto
    
    ls --color emits the color code irrespective of whether it is being
    attached to terminal or not. Which might result in color codes being
    added to file upon redirection.
    
    auto option with ls --color emits the color codes only the output is
    attached to terminal, otherwise the colors are turned off.
    
    Fixes the https://dev.haiku-os.org/ticket/8993
    
    Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
    ---
     data/etc/profile |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/data/etc/profile b/data/etc/profile
    index a654808..e61bbc8 100644
    a b export LC_COLLATE=$LC_MESSAGES  
    2424export LC_CTYPE=$LC_MESSAGES
    2525export LC_MONETARY=$LC_NUMERIC
    2626
    27 alias ls="ls --color"
     27alias ls="ls --color=auto"
    2828alias ll="ls -lA"
    2929alias la="ls -A"
    3030alias m="more"