4 ms·
> You can change the specific colors used by your terminal emulator, at least for the basic 16 colors. Doesn't that contradict the "semantic marking" argument?
by tgv 3y ago
> You can change the specific colors used by your terminal emulator, at least for the basic 16 colors.
Doesn't that contradict the "semantic marking" argument? Now you can't predict what the output will look like, and someone might like the color of grep output, but not ls.
I simply alias most commands that output color, BTW. The GNU utils all seem to support --no-color, and that's reasonable too, and flexible, except aliasing can be a bit tricky, and you have to add it for multiple commands, and scripts often don't recognize it.
The only disadvantage of NO_COLOR is that you can't unset it at the start of the command line. At least, I wouldn't know how. NO_COLOR=true/false could be switched per command.
> Why should `ls` show files in alphabetical order? Wouldn’t the last-use order be more helpful?
Apart from the fact that looking for a name becomes harder (and you clearly don't know what you're looking for if you only use ls), that ls -1tr is your friend, and that there always is some order, last-use order doesn't make sense for other cmd line utilities. There's no point in a global "SORT_ORDER=last-use" environment variable.
- Kwpolska 3y agoYou can change the specific color shades to something nicer, but keep the color mapping the same (1=red, 2=green etc.), just like most of these themes: https://github.com/lysyi3m/macos-terminal-themes https://github.com/lysyi3m/macos-terminal-themes
- assbuttbuttass 3y ago> The only disadvantage of NO_COLOR is that you can't unset it at the start of the command line. At least, I wouldn't know how. env -u NO_COLOR command...
- geocar 3y ago> The only disadvantage of NO_COLOR is that you can't unset it at the start of the command line. There is no need. An empty string is equivalent according to the spec, so: NO_COLOR= command is fine. > The GNU utils all seem to support --no-color, and that's reasonable too, and flexible, except aliasing can be a bit tricky, and you have to add it for multiple commands, and scripts often don't recognize it. I have more luck with setting the environment variables, e.g. LS_COLORS="rs=0:di=0:ln=0:mh=0:pi=0:so=0:do=0:bd=0:cd=0:or=0:mi=0:su=0:sg=0:ca=0:tw=0:ow=0:st=0:ex=0:*=0:" GREP_COLORS=ms=0:mc=0:sl=:cx=:fn=0:ln=0:bn=0:se=0