Re: display thousands separator in file size

2016-09-26 Thread Mooffie
On 9/26/16, Fourhundred Thecat <400the...@gmx.ch> wrote:
>
> I am using thousands separator with ls, and it hugely increases
> readability:
>
>   BLOCK_SIZE="'1" ls -lAF
>

You'll have this feature when ticket #3666 advances.[1]

>
> is there a simple way how I could modify the code, so that file size
> displayed in mc has thousands separator?

If you know how to compile code then simply install mc^2. It has this
feature.[2]

>
> is there a simple way how I could modify the code, so that file size
> displayed in mc has thousands separator?

It's not a simple one-line fix to the code. That's because the
thousands separators consume space, and the available space affects
the units used (which affects the space!). So it's like a
chicken-and-egg problem.

But, if you feel adventurous, and don't expect hand-holding from us:

In lib/utils.c find the function size_trunc_len(). Change the three
character string "%" (there's only one there!) to "%'". But now the
separators will consume space and the size column will cut off a digit
or two. So go to "Listing mode", choose "User defined", and change
"size" to "size:10" to give it 10 columns (or more). But, as I
explained, you'll sooner or later find that it's not perfect.

[1] http://www.midnight-commander.org/ticket/3666
[2] http://www.typo.co.il/~mooffie/mc-lua/docs/html/index.html
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


display thousands separator in file size

2016-09-26 Thread Fourhundred Thecat
Hello,

is there a simple way how I could modify the code, so that file size
displayed in mc has thousands separator?

I am using thousands separator with ls, and it hugely increases readability:

  BLOCK_SIZE="'1" ls -lAF

i.e. it takes couple of seconds to see the magnitude of a number like
this: 85249204057. Whereas the magnitude of a number with thousands
separators is immediately obvious: 85,249,204,057

Cheers,
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc