On 01/12/17 02:26, Jean Delvare wrote:
> Users may expect a different effect from option -k than is actually
> implemented, especially when the effect of that option has changed
> over time. The info page explains it well, but "ls --help" (and thus
> the ls.1 man page) do not.
> 
> * src/ls.c: Improve the description of option -k.
> ---
>  src/ls.c |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> --- coreutils.orig/src/ls.c   2017-12-01 10:14:46.297551197 +0100
> +++ coreutils/src/ls.c        2017-12-01 10:45:17.298050350 +0100
> @@ -5203,7 +5203,15 @@ Sort entries alphabetically if none of -
>    -i, --inode                print the index number of each file\n\
>    -I, --ignore=PATTERN       do not list implied entries matching shell 
> PATTERN\
>  \n\
> -  -k, --kibibytes            default to 1024-byte blocks for disk usage\n\
> +"), stdout);
> +      fputs (_("\
> +  -k, --kibibytes            default to 1024-byte blocks for disk usage;\n\
> +                               affects the per-directory block count written 
> by\
> +\n\
> +                               -l and -s, and the size written by -s, but 
> not\
> +\n\
> +                               the file size written by -l (use\n\
> +                               '--block-size=1024' for that)\n\
>  "), stdout);
>        fputs (_("\
>    -l                         use a long listing format\n\
> 
> 


Way too verbose.
How about:

diff --git a/src/ls.c b/src/ls.c
index 073e135..35367a7 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -5203,7 +5203,9 @@ Sort entries alphabetically if none of -cftuvSUX nor 
--sort is specified.\n\
   -i, --inode                print the index number of each file\n\
   -I, --ignore=PATTERN       do not list implied entries matching shell 
PATTERN\
 \n\
-  -k, --kibibytes            default to 1024-byte blocks for disk usage\n\
+"), stdout);
+      fputs (_("\
+  -k, --kibibytes            default to 1024B blocks for -s and dir 'total's\n\
 "), stdout);
       fputs (_("\
   -l                         use a long listing format\n\


Reply via email to