From a99f5883284c9f6635b7c170ffdebb5ab95180c7 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 7 Oct 2022 16:11:45 +0200 Subject: [PATCH] docs: More on bool flags Instead of duplicating this, just point above. --- doc_src/cmds/argparse.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_src/cmds/argparse.rst b/doc_src/cmds/argparse.rst index c6b411ec3..db34567d7 100644 --- a/doc_src/cmds/argparse.rst +++ b/doc_src/cmds/argparse.rst @@ -170,7 +170,7 @@ Some *OPTION_SPEC* examples: - ``h/help`` means that both ``-h`` and ``--help`` are valid. The flag is a boolean and can be used more than once. If either flag is used then ``_flag_h`` and ``_flag_help`` will be set to however either flag was seen, as many times as it was seen. So it could be set to ``-h``, ``-h`` and ``--help``, and ``count $_flag_h`` would yield "3". -- ``help`` means that only ``--help`` is valid. The flag is a boolean and can be used more than once. If it is used then ``_flag_help`` will be set to the count of how many times the long flag was seen. Also ``h-help`` (with an arbitrary short letter) for backwards compatibility. +- ``help`` means that only ``--help`` is valid. The flag is a boolean and can be used more than once. If it is used then ``_flag_help`` will be set as above. Also ``h-help`` (with an arbitrary short letter) for backwards compatibility. - ``longonly=`` is a flag ``--longonly`` that requires an option, there is no short flag or even short flag variable. @@ -180,7 +180,7 @@ Some *OPTION_SPEC* examples: - ``name=+`` means that only ``--name`` is valid. It requires a value and can be used more than once. If the flag is seen then ``_flag_name`` will be set with the values associated with each occurrence. -- ``x`` means that only ``-x`` is valid. It is a boolean that can be used more than once. If it is seen then ``_flag_x`` will be set to the count of how many times the flag was seen. +- ``x`` means that only ``-x`` is valid. It is a boolean that can be used more than once. If it is seen then ``_flag_x`` will be set as above. - ``x=``, ``x=?``, and ``x=+`` are similar to the n/name examples above but there is no long flag alternative to the short flag ``-x``.