Re: [Structuredtext-develop] option lists
Status: Pre-Alpha
Brought to you by:
goodger
From: Alan J. <ja...@po...> - 2002-02-25 16:18:09
|
On Sat, 23 Feb 2002, David Goodger wrote: > Alan Jaffray wrote: > > I don't see the value in the "dashes are implicit" behavior. It loses > > the ability to document non-GNU-style option lists. What does it gain? > > Once an option has been parsed and encoded in the doctree, the thing we're > most interested in is the option name, not the punctuation that goes along > with it. In my mind, the name of a command line option is "-a" or "--force", not "a" or "force". Likewise for "-geom" (not "geom" X-style), "/release" (not "release" DOS-style), or "co" (not "co" cvs-style). Hyphens never get stripped, and there's no parsing involved, let alone reparsing. Of course, that doesn't necessarily mean that the reStructuredText parser is going to recognize "#$&foo" ("foo" martian-style) as part of an option list. :) > <!ELEMENT option > ((short_option | long_option | vms_option), option_argument?)> > > In order to support nonstandard options (i.e. options which don't conform to > the above), I'd rather introduce a fourth type, perhaps > ``nonstandard_option`` which either keeps the punctuation in the text or in > an attribute: either ``<nonstandard_option>-long-option-with-one-hypen</>`` > or ``<nonstandard_option marker="-">long-option-with-one-hyphen</>``. Is it > necessary? I think it's at least desirable; but then, once it's created, I don't understand the need for the other options. When does one need to know whether a given option is short, long, trapezoidal, or whatever? > > There's a huge amount of existing software that uses single-dash long > > options. > > I wonder if any of that is a target audience for reStructuredText? ;-) Possibly. There's also a lot of new software that uses single-dash long options. Any new X program ought to support -geometry and -font. There's also the situation of someone writing internal docs describing a program for their users. > still-haven't-read-perl-getopt::long-ly yr's --David I didn't expect you would. I've never managed to make it all the way through myself. :-) Alan |