From 2269ea5aa2b8579ed2ec22407f55de4fd7218e4b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 24 Dec 2021 15:25:29 -0800 Subject: [PATCH] ls: improve doc for =WHEN * src/ls.c (usage): Improve clarity of =WHEN args (Bug#52782). --- src/ls.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/ls.c b/src/ls.c index c350787b6..d6c7302dc 100644 --- a/src/ls.c +++ b/src/ls.c @@ -5424,18 +5424,13 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\ "), stdout); fputs (_("\ -C list entries by columns\n\ - --color[=WHEN] color the output; WHEN can be 'always' (default\ -\n\ - if omitted), 'auto', or 'never'; more info below\ -\n\ + --color[=WHEN] color the output WHEN; more info below\n\ -d, --directory list directories themselves, not their contents\n\ -D, --dired generate output designed for Emacs' dired mode\n\ "), stdout); fputs (_("\ -f list all entries in directory order\n\ - -F, --classify[=WHEN] append indicator (one of */=>@|) to entries;\n\ - WHEN can be 'always' (default if omitted),\n\ - 'auto', or 'never'\n\ + -F, --classify[=WHEN] append indicator (one of */=>@|) to entries WHEN\n\ --file-type likewise, except do not append '*'\n\ --format=WORD across -x, commas -m, horizontal -x, long -l,\n\ single-column -1, verbose -l, vertical -C\n\ @@ -5468,8 +5463,7 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\ (overridden by -a or -A)\n\ "), stdout); fputs (_("\ - --hyperlink[=WHEN] hyperlink file names; WHEN can be 'always'\n\ - (default if omitted), 'auto', or 'never'\n\ + --hyperlink[=WHEN] hyperlink file names WHEN\n\ "), stdout); fputs (_("\ --indicator-style=WORD append indicator with style WORD to entry names:\ @@ -5563,6 +5557,10 @@ Also the TIME_STYLE environment variable sets the default style to use.\n\ "), stdout); fputs (_("\ \n\ +The WHEN argument defaults to 'always' and can also be 'auto' or 'never'.\n\ +"), stdout); + fputs (_("\ +\n\ Using color to distinguish file types is disabled both by default and\n\ with --color=never. With --color=auto, ls emits color codes only when\n\ standard output is connected to a terminal. The LS_COLORS environment\n\ -- 2.32.0