3 ms·
> 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 t
by 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