Skip to content
Myr

Some smaller doc updates

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 533cf7c · Browse files · 1 file+9 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−4 removed

  • other:+9 added−4 removed

1 file+9 added−4 removed

modified:docs/options.rst+9 added-4 removed
99 unmodified lines
100-------------101102Boolean flags are options that can be enabled or disabled. This can be103accomplished by defining two flags in one go separated by a slash (``/``)104for enabling or disabling the option. Click always wants you to provide105an enable and disable flag so that you can change the default later.104for enabling or disabling the option. (If a slash is in an option string105click automatically knows that it's a boolean flag and will pass106``is_flag=True`` implicitly). Click always wants you to provide an enable107and disable flag so that you can change the default later.108109Example:110111.. click:example::
40 unmodified lines
152----------------153154In addition to boolean flags there are also feature switches. These are155implemented by setting multiple options to the same parameter name and by154defining a flag value. To set a default flag assign a value of `True` to155the flag that should be the default.156defining a flag value. Note that by providing the ``flag_value`` parameter157click will implicitly set ``is_flag=True``.158159To set a default flag assign a value of `True` to the flag that should be160the default.161162.. click:example::163164 import os165
324 unmodified lines