<div dir="ltr">This problem came up while working in issue 9264 (<a href="http://bugs.python.org/issue9264">http://bugs.python.org/issue9264</a>). Copying the report from there:<br><br>----------------------------<br><br><br>

<pre>There&#39;s something weird going on with cmdoption... I&#39;ve applied for subscription to the docs mailing list, but while I&#39;m awaiting moderator approval, here&#39;s the brain-dump. Suppose this option description:

.. program:: trace

.. cmdoption:: -c, --count

   Blah blah blah

And now this reference:

This is a test long :option:`--count` and then short :option:`-c`, test.

Only the -c gets linked to ..cmdoption, not --count.
If I list --count before -c in ..cmdoption, then it&#39;s the other way around. What makes it kinda work (link both the long and short names) is:

.. cmdoption:: -c
               --count

   Blah blah blah

But this isn&#39;t standard (although it doesn&#39;t look too bad). Actually, the original listing (the short name first, then the long one) is customary in the library docs.</pre><br></div>