On 26.11.2018 04:25, Daniel Shahaf wrote:
> Branko Čibej wrote on Sun, 25 Nov 2018 18:51 +0100:
>> It's just a damn shame that the '-h' flag is already taken, otherwise we
>> could be like 'df' and use -h for base-2 units and -H for base-10 units,
>> whereas now it's -H for base-2 units ... if anyone has any bright ideas
>> for fixing this omission, please say so.
> We've traditionally been careful about not using up the one-letter-option
> space. Are we sure that this merits *two* one-letter option?
I really like the idea of 'svn ls -vH' as a sort of mnemonic of 'ls
-lh'. Note that whilst the actual option letters are different -- on
purpose, we had a long discussion about -v vs. -l a long time ago -- the
use of single-letter options in this case would be nice. I suspect -H
would be used almost as often as -v, but no-one would probably bother
with --human-readable. (OK, bash-completion helps.)
>> I'd though about adding a --base-10 flag, so '-H' is base-2 units and
>> '-H --base-10' would use base-10 units. I do think that the default
>> should be base-2, because users are probably more used to thinking that
>> way. Well, at least programmers are, and they are, after all, the main
>> users of version control.
> I'm not a fan of having one flag modify another flag's meaning. I'd prefer
>
> --base=2
> --base=10
Not so bad. I'd call it --unit-base then, to avoid confusion with number
bases.
> (we needn't support other values (except perhaps --base=1 for the 1.11 behaviour))
?:\ Which behaviour?
> I suppose we could then have --human-readable as "currently, an alias to
> --base=10", with an option to extend it --- like 'diff --patch-compatible'.
I like this approach. But I'd make --human-readable === --unit-base=2,
for reasons already mentioned.
>> Ah, right: r1847422 fixes a silly bug in the number scaling, but more
>> importantly it changes the number formatting to use the locale-specific
>> decimal separator, to make it consistent with the locale-specific date
>> abbreviation:
> I'm just glad there's no such thing as locale-specific SI prefixes.
> (What's a kilobyte in imperial?)
That'll be 4d 7p and a farthing, thank you.
-- Brane
Received on 2018-11-26 05:38:24 CET