guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Ab?)using aliases to set ls' and others' colours


From: Björn Höfling
Subject: Re: (Ab?)using aliases to set ls' and others' colours
Date: Wed, 4 Jul 2018 20:01:15 +0200

On Tue, 03 Jul 2018 13:38:34 +0200
Tobias Geerinckx-Rice <address@hidden> wrote:

> Tobias Geerinckx-Rice wrote:
> > Björn Höfling wrote:  
> >> ls has a colored output. Nice.
> >> ls | less has ugly escape sequences. Only ls --color=no | less
> >> works.  

[..]

> 
> Perhaps it was assumed that ‘--color’ on its own implies ‘auto’ 
> instead of ‘always’ (I could see how that could happen)? Or 
> ‘--color=auto’ is too cautious, and disables colour in a situation 
> where the author expects it? In that case I don't think the 
> trade-off is worth it.


Just for reference: Here is what my Ubuntu has in /etc/skel/.bashrc:

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval 
"$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

[..]

> Oh, I don't know.
> 
> This is the kind of trivial bug that would've put me off a distro, 
> I guess.

Yeah, it's one of those nasty little things that are totally silly but
on the other hand are expected to "just work".

Björn

Attachment: pgpkLD8JP4g2g.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]