Don Cragun writes: > The reason I asked to discuss ls during yesterday's meeting is that the > materials provided in the initial mail (before the man page was added to > the case directory) contained the following: > --color[=WHEN], --colour[=WHEN] > which shows WHEN as an optional option-argument to the --color and > --colour long options and indicates that the '=' is not required.
Actually, it shows that the '=' form *is* required. The dangerous form that I was concerned about is: --color [WHEN] ... that is, an optional argument that consumes an additional argv[] entry, but does so only conditionally. If that's actually allowable, then I do think a warning about the syntax is appropriate. > list the file 'auto' never using color. The commands: > ls -l --color=auto > and > ls -l --color= auto > are not ambiguous, but these are not the only allowed forms. That part isn't clear to me. The materials say that only '--color[=WHEN]' is allowed, and not the other forms you're describing. It's possible that the submitter is confused about what he's actually asking for, or that we're confused about the way it'll be documented and will function. I'd like to hear from the submitter. > It also listed: > --time-style=[STYLE] > which shows that the '=' is required for this long option, and > presumably means that if STYLE is the empty string it is equivalent to > --time-style=locale. True. That's actually a required option argument, and just one that happens to be allow an empty string. It's not an optional option argument. > The man page also does not list any of the new long options in the > SYNOPSIS section and didn't make any adjustments to the ATTRIBUTES > section in the places where it indicates that -A, -b, -e, -E, -h, -S, > -v, -V, -@, -/, and -% are not covered by the standards (thereby > indicating that these new long option are required by the POSIX and > SUS specs. I assume all of these issues will be fixed before the > man page is published, but I would like the project team to acknowledge > that this needs to be fixed. OK. Actually, I think these are issues for the man page writers. The man page contents are interesting and helpful for ARC review, and certainly getting it right is important, but I do not agree that detailed man page reviews are architecture. -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677