Bjoern Voigt wrote:
Hello,

as I played a bit with the "--color" option of "ls" I found, that some
values of "--color=WHEN" are undocumented.

The valid options of "--color=WHEN" are according to the source code

coreutils-7.0/src/ls.c:828:

    static char const *const color_args[] =
    {
/* force and none are for compatibility with another color-ls version */
        "always", "yes", "force",
    "never", "no", "none",
    "auto", "tty", "if-tty", NULL
    };

But "ls --help" only shows:

--color[=WHEN] control whether color is used to distinguish file types. WHEN may be `never', `always', or `auto'
      [...]

I don't think this is an issue. The preferred values are 'never', 'always' and 'auto'. The others have the same effect as one of these, and are provided solely for compatibility with old aliases/shell scripts. Therefore I think not documenting them is intentional, and not harmful.

(In particular, '--color=tty' seems to be a common convention; my own aliases even use that spelling of 'auto'.)

Also the manual page is incomplete:

The manpage is generated from --help, so it is not surprising they are the same.

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Oh, the double-entendre!


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to