Markus Wichmann wrote: > Because ls's job is to list files. Not to columnate output. There's > another tool for that.
Makes sense; there's cols(1) for that. > Unfortunately, GNU ls is capable of outputting color codes, but BSD > column is not capable of understanding them. I tried to write something > like this myself, once, and I wonder what's the easiest way to find out > the width a string will take up on a terminal. Because that's the info > you need to columnate the output properly, and short of implementing all > possible terminal control strings myself again, I don't know how to do > this. wcwidth() is of limited utility in this quest, as control codes > consist of multiple characters of which most do take up space if on > their own, but don't in this sequence. I see no need in colors in terminal except maybe one-two programs; with BusyBox I have to alias ls to "ls --color=never", because by default it shows color, a behavior copied from gahnoo. -- caóc