3 ms·
From the ls replacement: "Why spend your time squinting at black and white text?" Uh, because squinting at blue-on-black text is much more difficult. Human eye
by burfog 6y ago
From the ls replacement: "Why spend your time squinting at black and white text?"
Uh, because squinting at blue-on-black text is much more difficult. Human eyes focus best at yellow-green, they see that as brightest, and they don't even have long-wavelength (blue) receptors in the fovea.
I also looked at the alternatives to ps, top, cat, find, and du.
My overall feeling is that these are really not like UNIX tools at all. They are not very scriptable. Output is full of Unicode, color, column dividers, headers, underlining, and pagination. Values are in so-called "human readable" form, like "1.4M" instead of 1474560 or whatever it may be, which is a real pain for scripting.
I also notice some features that seem out of place to me, a long-time UNIX user. The tools waste space on displaying things related to git, docker, and network connections. I would expect the proper tools to be more like "git ls", "docker ls", "docker ps", and "netstat -p". (for those ones that don't actually exist, take that as a suggestion for a coding project) Not all the world is devops on a web site.
- ReactiveJelly 6y agoMy distro's ls already does coloring by default. It turns it off somehow if it detects the output is a pipe, so that "ls | less" still works. It also turns off multi-column in that case, so "ls | wc -l" counts directory entries.
- boulos 6y agohttps://linux.die.net/man/3/isatty https://linux.die.net/man/3/isatty :)
- Myrmornis 6y agoThat's not fair. They typically turn off visual adornments when the output is not a tty, thus automatically supporting consumption by both human eyes and scripts.
- nine_k 6y agoI think you made a typo; long-wavelength is red, and blue is short wavelength.
- burfog 6y agoYes. It's the short-wavelength receptors that are missing from the fovea. Informally, they are blue receptors, but the ranges overlap in a much more complicated way. Terrible color combinations for text: blue/black, magenta/red, cyan/green, white/yellow. The example uses blue/black.
- kohtatsu 6y agosd(1) looks super cute. https://github.com/chmln/sd https://github.com/chmln/sd Very UNIX-y imo.
- rcxdude 6y agoWell, this is basically the direction that GNU tools have been growing in for a while. And I think that's because ultimately these are tools with a human interface first, script interface second (and UNIX has always been mediocre at the script interface part: shell scripts are just bad programming languages).