3 ms·
I like vanilla `ls` but I do miss some display options from GNU ls when I'm on Mac, e.g., grouping directories first. Luckily, of course, it's open source, so
by torstenvl 3y ago
I like vanilla `ls` but I do miss some display options from GNU ls when I'm on Mac, e.g., grouping directories first.
Luckily, of course, it's open source, so I just added the options I needed.
https://github.com/torstenvl/betterls https://github.com/torstenvl/betterls if anyone is interested
exa seemed like overkill for my needs, and it was easier to add a couple lines of code than to learn a whole new tool.
- gray_-_wolf 3y agoYou could also just install coreutils via brew...
- torstenvl 3y agoLast I checked, GNU coreutils don't know anything about, e.g., macOS extended attributes. I specifically wanted to stay close to stock because macOS `ls` is designed for the system it runs on. Installing coreutils would be counterproductive.
- cb321 3y agoIt's also a whole other tool and in Nim to boot, but https://github.com/c-blake/lc https://github.com/c-blake/lc allows you to group "dot-directories" before "dot-files" before "non-dot directories" before non-dot files. There might be enough other new functionality such as abbreviation or multi-attribute colorization schemes to motivate learning a new tool. E.g., neither "dot-ness" nor "directory-ness" in the above is hard-coded. They could be any other convenient elements of the typology / taxonomy.
- pneumic 3y agoon mac I do this: alias ls='LC_COLLATE=C \ls -F' doesn't sort dot directories before dot files, but it's good enough