Issue #26638: Fix links to some CLI options
Disable inappropriate links to Python interpreter options. Also make CLI
section label in timeit less ambiguous.
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index 7ebc208..9f59dda 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -56,7 +56,7 @@
By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The
:option:`-l` flag lists all available fixers. An explicit set of fixers to run
-can be given with :option:`-f`. Likewise the :option:`-x` explicitly disables a
+can be given with :option:`-f`. Likewise the :option:`!-x` explicitly disables a
fixer. The following example runs only the ``imports`` and ``has_key`` fixers::
$ 2to3 -f imports -f has_key example.py
@@ -78,12 +78,12 @@
beneath the diff for a file. You should address the warning in order to have
compliant 3.x code.
-2to3 can also refactor doctests. To enable this mode, use the :option:`-d`
+2to3 can also refactor doctests. To enable this mode, use the :option:`!-d`
flag. Note that *only* doctests will be refactored. This also doesn't require
the module to be valid Python. For example, doctest like examples in a reST
document could also be refactored with this option.
-The :option:`-v` option enables output of more information on the translation
+The :option:`!-v` option enables output of more information on the translation
process.
Since some print statements can be parsed as function calls or statements, 2to3
@@ -102,14 +102,14 @@
.. versionadded:: 2.7.3
The :option:`-o` option was added.
-The :option:`-W` or :option:`--write-unchanged-files` flag tells 2to3 to always
+The :option:`!-W` or :option:`--write-unchanged-files` flag tells 2to3 to always
write output files even if no changes were required to the file. This is most
useful with :option:`-o` so that an entire Python source tree is copied with
translation from one directory to another.
This option implies the :option:`-w` flag as it would not make sense otherwise.
.. versionadded:: 2.7.3
- The :option:`-W` flag was added.
+ The :option:`!-W` flag was added.
The :option:`--add-suffix` option specifies a string to append to all output
filenames. The :option:`-n` flag is required when specifying this as backups
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst
index 2cb3c9d..e7b3548 100644
--- a/Doc/library/timeit.rst
+++ b/Doc/library/timeit.rst
@@ -16,7 +16,7 @@
--------------
This module provides a simple way to time small bits of Python code. It has both
-a :ref:`command-line-interface` as well as a :ref:`callable <python-interface>`
+a :ref:`timeit-command-line-interface` as well as a :ref:`callable <python-interface>`
one. It avoids a number of common traps for measuring execution times.
See also Tim Peters' introduction to the "Algorithms" chapter in the *Python
Cookbook*, published by O'Reilly.
@@ -25,7 +25,7 @@
Basic Examples
--------------
-The following example shows how the :ref:`command-line-interface`
+The following example shows how the :ref:`timeit-command-line-interface`
can be used to compare three different expressions:
.. code-block:: sh
@@ -170,7 +170,7 @@
where the traceback is sent; it defaults to :data:`sys.stderr`.
-.. _command-line-interface:
+.. _timeit-command-line-interface:
Command-Line Interface
----------------------
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index 27658d6..40a0770 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -256,7 +256,7 @@
Warnings that are only of interest to the developer are ignored by default. As
such you should make sure to test your code with typically ignored warnings
-made visible. You can do this from the command-line by passing :option:`-Wd`
+made visible. You can do this from the command-line by passing :option:`-Wd <-W>`
to the interpreter (this is shorthand for :option:`-W default`). This enables
default handling for all warnings, including those that are ignored by default.
To change what action is taken for encountered warnings you simply change what