GNU bug report logs -
#9939
Problems with the SIZE description in man pages for <ls> and <du>
Previous Next
Reported by: abdallah clark <clark-adc <at> clear.net>
Date: Wed, 2 Nov 2011 15:16:02 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #95 received at 9939 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 11/15/2011 11:25 AM, Jim Meyering wrote:
> Eric Blake wrote:
>
>> On 11/15/2011 11:12 AM, Ruediger Meier wrote:
>>> I also think the multiplier version is a bit easier to read.
>>> My preferred one would be something like this:
>>>
>>> -SIZE is an integer with an optional suffix (example: 10MB). Suffixes are:\n\
>>> -KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\
>>> +SIZE is an integer with an optional unit, e.g. 10M (1024*1024). Valid units\n\
>>> +are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).\n\
>>
>> Not quite accurate on 10M. But I think it does read a bit better. How
>> about this tweak to fix the example, while still fitting in the line
>> limitations:
>>
>> +SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units\n\
>> +are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers of 1000).\n\
>
> Go for it. Thanks to both of you.
Ruediger, if you're okay with this commit being in your name, then I
will push this:
From e36e6f2c6e95d6e23be805f7bab6c596b1818d22 Mon Sep 17 00:00:00 2001
From: Ruediger Meier <sweet_f_a <at> gmx.de>
Date: Tue, 15 Nov 2011 11:55:23 -0700
Subject: [PATCH] ls: another reword of generic size note
* src/system.h (emit_size_note): Use "unit" rather than "suffix",
and move multiplication to example instead of in suffix list.
See additional discussion in Bug#9939.
---
src/system.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/system.h b/src/system.h
index 1cbde92..ae8dcc2 100644
--- a/src/system.h
+++ b/src/system.h
@@ -516,8 +516,8 @@ static inline void
emit_size_note (void)
{
fputs (_("\n\
-SIZE is an integer with an optional suffix (example: 10MB). Suffixes
are:\n\
-KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E,
Z, Y.\n\
+SIZE is an integer and optional unit (example: 10M is 10*1024*1024).
Units\n\
+are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of
1000).\n\
"), stdout);
}
--
1.7.7.1
--
Eric Blake eblake <at> redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 6 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.