Am 31.05.2012 09:02, schrieb Guenter Milde:
> On 2012-05-30, Michael Schlenker wrote:
>> Hello,
> 
>> i tried to cross reference some option when program contexts are used.
> 
>> Contrary to the documentation
>> (http://sphinx.pocoo.org/markup/inline.html#xref-syntax) it is not
>> currently possible to suppress the
>> program name when referencing.
> 
>> Example:
> 
>> .. program:: foo
> 
>> .. option:: -baz
> 
>>    The baz option.
> 
>> .. program:: bar
> 
>> .. option:: -baz
> 
>> When using :program:`foo`, you can use :option:`~foo -baz` to ...
> 
>> I would have expected that this creates '-baz' with a link to the
>> correct option, instead it writes `~foo -baz`, e.g no link at all.
> 
>> Is this a bug (e.g. should this work), or a missing feature?
> 
> Maybe you need to nest the options?
> 
> .. program:: foo
> 
>   .. option:: -baz
>   
>      The baz option.
> 
> .. program:: bar
> 
>   .. option:: -baz
> 
No, this raises an error:
index.rst:4: ERROR: Error in "program" directive: no content permitted.

Seems Sphinx lacks a bit when using it to document complex commandline
programs.

But maybe this it can be fixed, its in the same broken code area as
other option parsing 'bugs' like:
https://bitbucket.org/birkenfeld/sphinx/issue/933/bad-option-value-terminates-build-instead

Michael

-- 
Michael Schlenker
Software Architect

CONTACT Software GmbH           Tel.:   +49 (421) 20153-80
Wiener Straße 1-3               Fax:    +49 (421) 20153-41
28359 Bremen
http://www.contact.de/          E-Mail: [email protected]

Sitz der Gesellschaft: Bremen
Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215

-- 
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