Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can customize LS_COLORS if you want, but I've never been mad at the defaults. Also, I prefer c-style escapes, which allows you to copy and paste the filename and use it in other commands:

    alias ls='ls --color=auto -F -b -T 0 -A'

    -F classify entries with (*/=>@|)
    -b use c-style escapes instead of quoting
    -T 0 do not use tabs for alignment
    -A show all dotfiles except . and ..
Plus, I find colors to be insanely useful when my old eyes try to read 'ip' output, so I really do prefer:

    alias ip='ip --color=auto'


After more than two decades - never knew ip had the --color switch, TIL and thanks! :)


I really wish there were a unified environment variable to enable colors for everything instead of having a separate one for everything or having to clutter your bashrc with a trillion aliases.


I decided to clutter the filesystem instead and have my bashrc source a bunch more files.

It helps me, at least.




Same! Thanks

I wasn't used to ip over ifconfig until a few years ago anyway lol


Interesting! I've been using "grc" to provide colours for commands like "ip", I didn't realise that "ip" had a "--color=auto" option.


Which 'ip' implementation has the --color switch?


The one from iproute2 has the --color (or shorter -c) option. That variant is installed by default on most (non-minimal) Linux Distributions.

But the one from the BusyBox suite (e.g., the default in Alpine Linux) doesn't have the color option.


The version of 'ip' on my F38 system is part of iproute2[0][1] and includes --color.

[0]https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2...

[1]https://wiki.linuxfoundation.org/networking/iproute2


> but I've never been mad at the defaults

The default for o+w directories having a bright green background colour with grey text is kind of annoying to me, I suppose you could argue that o+w directories should be annoying so that you are aware of their existance and risk


If I'm going to see yet another blue on black, I'd rather have black and white forever.


What shade of blue do you have configured? The default is this impossible to read shade of dark blue, so the first thing I do is configure a different, readable shade of not-so-dark blue.


Ya that dark blue on black is the worst. The moment the world went past 16 colors it should have been disposed of.


> Ya that dark blue on black is the worst

Nah, yellow on white is the worst. Authors, please stop assuming everyone uses a dark background (and consider looking up ‘astigmatic halation’).


They usually just set it to #0000FF. So the first thing to do is synch bashrc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: