[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FEATURE REQUEST: Re: 'ls' human-readable sizes

From: Boruch Baum
Subject: Re: FEATURE REQUEST: Re: 'ls' human-readable sizes
Date: Sun, 18 Jun 2017 22:02:42 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On 2017-06-18 11:32, Pádraig Brady wrote:
> On 18/06/17 03:51, Boruch Baum wrote:
> > When I visually scan 'ls -lh' output, I find it difficult to notice
> > every instance of the convenience presentation of 'k' and 'm'. Could
> > you consider making them more visible, either through colorization of the 
> > letter,
> > bold face of the letter, indentation, or marking?
> >
> > By indentation, I mean comething like:
> >
> >    111
> >      4M
> >     11
> >
> > By marking, I mean something like:
> >
> >    111
> >     4M<-
> >     11
> This wouldn't be core functionality so if we were to do that
> it would be better in numfmt I think. For example you can get ls -lh
> functionality now with numfmt like:
>   \ls -l | numfmt --header --field=5 --to=si
> Looking at my numfmt TODO here I see this pertinent item:
>   Have numfmt --format='%f ' put a space between number and auto units

Thanks for the quick reply.

1] For the `numfmt' functionality, let me suggest that your TODO item
alter the implementation.

1.1] Using spaces for purposes other than for delimiting in `numfmt'
is bound to mess up scripts. How about using an underscore instead of
a space?

1.2] My guess is that people would want / expect "post number" text,
including whitespace, to appear exactly as they write it. For example
they might actually want a space in their format string exactly where
you want to use it for your option (eg. `--format='%f €' ). Even if you
reject the idea in par. 1.1, maybe use. `--format='%_f' to indicate
placement of the space (or my preference, the underscore).

2] By way of persisting about an enhancement to `ls' functionality:

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"). 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.

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?

Kind regards,

CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]