On 18/06/17 23:04, Boruch Baum wrote: > On 2017-06-18 22:14, Pádraig Brady wrote: >> On 18/06/17 19:02, Boruch Baum wrote: >>> On 2017-06-18 11:32, Pádraig Brady wrote: >>>> On 18/06/17 03:51, Boruch Baum wrote: > > [snip] >>> want to use it for your option (eg. `--format='%f €' ). Even if you > Hmm, this was supposed to be a 'euro currency sign'. ^^ > > [snip] > >>> 2.1] The current `h' doesn't note the units of small-sized files as >>> `bytes', so let it do so, but instead of marking those numbers with a >>> `B', use a space (a kind of "silent" `b', like in "lamb"). >> >> You mean, a kind of "silent" `b', like in "subtle" :) >> >>> The result >>> would align all numbers in the column, and it would be easier to note >>> the `K', `M', etc. markers. This suggestion produces the same result >>> as indentation, but is just a tweak to the already existing `h' for >>> small values. >> >> This isn't a bad suggestion. >> A 1 minute patch not considering edge cases to do that is: > > [snip] > >> Which results in this output: >> >> drwxrwxr-x. 26 padraig padraig 4.0K Jun 17 19:50 tests >> -r--r--r--. 1 padraig padraig 48K Mar 8 21:02 THANKS >> -rwxrwxr-x. 1 padraig padraig 441 May 28 2012 thanks-gen >> -rw-rw-r--. 1 padraig padraig 38K Mar 11 10:44 THANKS.in >> -rw-rw-r--. 1 padraig padraig 2.0K Mar 9 23:07 THANKS-to-translators >> -rw-rw-r--. 1 padraig padraig 121 Aug 23 2011 THANKStt.in >> -rw-rw-r--. 1 padraig padraig 6.7K Jan 1 14:34 TODO >> >> Not to everyone's taste I suppose being not right aligned. > > I'll vote thumbs up, since it's optional
True, but -h would be a very commonly used option. I'd be 60:40 against this change. > but it occurs to me to ask, > without knowing the `ls' internals: does this mess up or complicate > sorting by size? No, that's not impacted as done numerically before output. >>> 2.2] Does LS_COLORS operate only on the final field? Is there a >>> possible user hack to have LS_COLORS operate on the size field? >> >> Not at present. You might be able to do some post processing highlighting >> like my http://www.pixelbeat.org/scripts/l script does. > > I'll check it out, thanks. An example implementation is at https://gist.github.com/anonymous/327fa19405883157ae660236cbc9ad5e cheers, Pádraig