Hacker News new | ask | show | jobs
by Macha 1022 days ago
ls does not have a consistent interface beyond the basics. And honestly, for the "portable subset", you may not even realise that ls is aliased to exa or lsd or whatever. This is why on why of my systems I'm sitting at right now, (MacOS) ls --help reports "unrecognized option `--help`" and on the other (GNU) ls reports a list of options so long that the entire alphabet is accounted for in both lower and upper case.
1 comments

--help doesn't do anything functional so that's not a good example.
-R, --group-directories first are some notable, frequent options I use on GNU ls that are missing from MacOS ls. Along with every "long" option, which I like to prefer in scripts to make them more self documenting.

exa actually does support both, so in a way it's more compatible with my usage of (GNU) ls than (MacOS) ls is.

-R does work on macOS. It's part of POSIX and macOS is actually certified Unix.