bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inaccurate/incorrect description of the -b option in man ls(1)


From: Jim Meyering
Subject: Re: Inaccurate/incorrect description of the -b option in man ls(1)
Date: Thu, 18 Mar 2010 16:20:03 +0100

Eric Blake wrote:
> On 03/18/2010 02:34 AM, Jim Meyering wrote:
>> address@hidden wrote:
>>> In the manpage for ls(1), the description of the -b option says,
>>> "print octal escapes for nongraphic characters"
>
>> Note that the authoritative documentation for GNU ls is not the
>> man page (which is merely the massaged output of ls --help)
>> but rather the info doc, i.e., what you get when you run
>> "info coreutils ls".  Its "Formatting the file names" section says this:
>>
>>     `-b'
>>     `--escape'
>>     `--quoting-style=escape'
>>          Quote nongraphic characters in file names using alphabetic and
>>          octal backslash sequences like those used in C.
>>
>> which is consistent with GNU ls's behavior.
>
> How about a patch that shortens the --help output:
>
> s/octal //
>
> or maybe slightly longer, but still legible:
>
> s/octal /c-style/

Good idea.  I like this one.
Thanks.

I did it in your name.  Ok?

>From 94f9ef9ae978c5262644089dbef8796e74c15ba4 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 18 Mar 2010 16:19:08 +0100
Subject: [PATCH] doc: improve ls --help's description of --escape (-b)

* src/ls.c (usage): Be more precise about how --escape (-b) works:
say "C-style escapes", not "octal escapes".  Reported by Jacky Fong.
---
 THANKS   |    1 +
 src/ls.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/THANKS b/THANKS
index a538644..65a3ab9 100644
--- a/THANKS
+++ b/THANKS
@@ -255,6 +255,7 @@ Ilya N. Golubev                     address@hidden
 Ingo Saitz                          address@hidden
 Ivan Labath                         address@hidden
 Ivo Timmermans                      address@hidden
+Jacky Fong                          address@hidden
 James                               address@hidden
 James Antill                        address@hidden
 James Lemley                        address@hidden
diff --git a/src/ls.c b/src/ls.c
index 3025a76..6bd680e 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4594,7 +4594,7 @@ Mandatory arguments to long options are mandatory for 
short options too.\n\
   -a, --all                  do not ignore entries starting with .\n\
   -A, --almost-all           do not list implied . and ..\n\
       --author               with -l, print the author of each file\n\
-  -b, --escape               print octal escapes for nongraphic characters\n\
+  -b, --escape               print C-style escapes for nongraphic characters\n\
 "), stdout);
       fputs (_("\
       --block-size=SIZE      use SIZE-byte blocks.  See SIZE format below\n\
--
1.7.0.2.455.g91132




reply via email to

[Prev in Thread] Current Thread [Next in Thread]