]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: mention how to avoid newlines impacting ls -1
authorPádraig Brady <P@draigBrady.com>
Fri, 21 Nov 2014 16:20:03 +0000 (16:20 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 21 Nov 2014 16:25:42 +0000 (16:25 +0000)
* src/ls.c (usage): Mention the -b and -q options
in the -1 description.
* doc/coreutils.texi (ls invocation): Likewise.

doc/coreutils.texi
src/ls.c

index f089e435cf72f975ae100647bbfd1ad0a571479c..db24a75dd60e373ffd7830e92e85f4e35eaafb5d 100644 (file)
@@ -7547,7 +7547,8 @@ These options affect the appearance of the overall output.
 @opindex --format
 @opindex single-column @r{output of files}
 List one file per line.  This is the default for @command{ls} when standard
-output is not a terminal.
+output is not a terminal.  See also the @option{-b} and @option{-q} options
+to suppress direct output of newline characters within a file name.
 
 @item -C
 @itemx --format=vertical
index 8b5b2cf74aae962320b21f7d3d8a73208beb2778..5bae06fbeccb50285ea2662bcb5851e404a75acf 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -4929,7 +4929,8 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
   -x                         list entries by lines instead of by columns\n\
   -X                         sort alphabetically by entry extension\n\
   -Z, --context              print any security context of each file\n\
-  -1                         list one file per line\n\
+  -1                         list one file per line.  Avoid '\\n' with -q or -b\
+\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);