3 ms·
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 fil
by akira2501 4y ago
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'
- Flimm 4y agoInteresting! I've been using "grc" to provide colours for commands like "ip", I didn't realise that "ip" had a "--color=auto" option.
- tommieb 4y agoAfter more than two decades - never knew ip had the --color switch, TIL and thanks! :)
- iforgotpassword 4y agoI 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.
- doubled112 4y agoI decided to clutter the filesystem instead and have my bashrc source a bunch more files. It helps me, at least.
- jwilk 4y agoColor support was added only in 2015: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=d7bd2db52c1fcfe5 https://git.kernel.org/pub/scm/network/iproute2/iproute2.git...
- hddqsb 4y agoAnd "auto" only added in 2018 (https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=ff1ab8edf827f55b86c6487c90b7454975d52236 https://git.kernel.org/pub/scm/network/iproute2/iproute2.git...).
- porbelm 4y agoSame! Thanks I wasn't used to ip over ifconfig until a few years ago anyway lol
- nurettin 4y agoIf I'm going to see yet another blue on black, I'd rather have black and white forever.
- zamnos 4y agoWhat 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.
- nurettin 4y agoThey usually just set it to #0000FF. So the first thing to do is synch bashrc.
- pixl97 4y agoYa that dark blue on black is the worst. The moment the world went past 16 colors it should have been disposed of.
- kps 4y ago> 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’).
- blueflow 4y agoWhich 'ip' implementation has the --color switch?
- voxadam 4y agoThe 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/ https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2... [1]https://wiki.linuxfoundation.org/networking/iproute2 https://wiki.linuxfoundation.org/networking/iproute2
- tlamponi 4y agoThe 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.
- NikkiA 4y ago> 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