dthree / cash

Cross-platform Linux commands in ES6
MIT License
7.77k stars 200 forks source link

Grep and ls use colors by default #26

Open nfischer opened 8 years ago

nfischer commented 8 years ago

I noticed that cash's grep uses colored output by default. This doesn't seem to be a POSIX compliant default, however. On my Ubuntu system, if I type grep 'o' package.json, it's true that I'll see colored output, but that's because Ubuntu aliases grep by default.

You can see the actual default behavior of GNU grep if you type something like:

bash $ \grep 'o' package.json # Putting a backslash in front makes sure bash doesn't call an alias
bash $ alias grep # see what it's aliased to
alias grep='grep --color=auto'

I'm not sure if cash's default was by design (which wouldn't be the worst decision), or if it was just assumed this was the default.

I noticed the same thing with ls, which also doesn't use colors by default, it just so happens that it's commonly aliased to alias ls='ls --color=auto'.

dthree commented 8 years ago

Noticed that recently. I can change it - that's pretty simple.

I might default in the alias too, though, into cash.


Sorry my recent responses haven't had much action - a bit busy right now.

nfischer commented 8 years ago

Sorry my recent responses haven't had much action - a bit busy right now.

No worries! I just figured I'd point out some of the things I've noticed so far. No rush.