I'd like to offer a suggestion for an enhancement to cmdoption. I find
that I need to document multiple, small programs in the same document.
And many of them have a common option like "-in".

The current method will cause a clash if the two are defined in the
same .rst file. Fine, I can put them in separate files, but when it
comes time to reference or index these options, they don't work as
expected.

I'd like to suggest an additional keyword, much like ".. module::",
say ".. program:: foo" that sets the "current" program that all
options are members of. Then references could be :option:`foo-in`
instead of just :option:`-in`. This will remove the ambiguity. And if
the "..program:: foo"  is never set, then the current behavior is
unchanged.

More interestingly, this allows index entries that make sense. Right
now, I get an index like:

-in
  command line option
-in
  command line option

command line option
    -in
    -in

where I'd like to be able to do:

.. program:: foo

.. cmdoption:: -in

   This the input file for foo.

.. cmdoption:: -out

   This is the output file.

.. program:: bar

.. cmdoption:: -in

   This is the input file for bar.

.. cmdoption:: -out

   This is the output file.

and be able to reference a specific option with :option:`foo-in` and
:option:`bar-in`. Or something similar to who class/type methods are
referenced.

and equally usefully, I'd like to get an index that looks like:

-in
   foo, bar
-out
   foo, bar

bar
   -in
   -out

foo
   -in
   -out

Thanks for listening,

Bob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to