|
From: | Matthew Woehlke |
Subject: | Re: Undocumented values of ls --color |
Date: | Tue, 14 Oct 2008 18:43:08 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.16) Gecko/20080723 Fedora/2.0.0.16-1.fc9 Thunderbird/2.0.0.16 Mnenhy/0.7.5.0 |
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!
[Prev in Thread] | Current Thread | [Next in Thread] |