[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command-line program to convert 'human' sizes?
From: |
Assaf Gordon |
Subject: |
Re: Command-line program to convert 'human' sizes? |
Date: |
Tue, 04 Dec 2012 19:56:02 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 |
Pádraig Brady wrote, On 12/04/2012 07:31 PM:
> On 12/05/2012 12:19 AM, Jim Meyering wrote:
>> Pádraig Brady wrote:
>>> On 12/04/2012 11:35 PM, Assaf Gordon wrote:
>>>> Pádraig Brady wrote, On 12/04/2012 06:11 PM:
>>>>> On 12/04/2012 10:55 PM, Assaf Gordon wrote:
>>>>>>> Pádraig Brady wrote, On 12/04/2012 11:30 AM:
< snip long discussion >
Would the following be acceptable:
1. remove "--to=<NUMBER>" option
2. surplus characters following immediately after converted number trigger a
warning (error?),
except if the following characters match exactly the "suffix" parameter.
Regarding "--format":
The implementation doesn't really use "printf", so "%d" isn't directly usable.
One option is to tell the user to use "%s" (instead of "%d"), and we'll simply
put the result of "human_readable()" as the string parameter in vasnprintf -
this will be flexible in terms of alignment.
Another option is the remove "--format" option, and replace it with "--padding"
or similar.
Regarding grouping (thousands separator):
This only has an effect when no using "--to=SI" or "--to=IEC", right?
Perhaps we can add a separate option "--grouping", and simply turn on the
"human_grouping" flag? (easy to implement).
- Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Jim Meyering, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/04
- Re: Command-line program to convert 'human' sizes?,
Assaf Gordon <=
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/04
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/05
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/05
- Re: Command-line program to convert 'human' sizes?, Jim Meyering, 2012/12/05
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/05
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/05
- Re: Command-line program to convert 'human' sizes?, Assaf Gordon, 2012/12/05
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/06
- Re: Command-line program to convert 'human' sizes?, Bernhard Voelker, 2012/12/06
- Re: Command-line program to convert 'human' sizes?, Pádraig Brady, 2012/12/06