Fix typos in second half of options docs.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Edward G · committed by Edward G · parent 680e888 · Browse files · 3 files·+9 added−15 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+9 added−15 removed
- other:+9 added−15 removed
Provenance
- Commit
ff4b7f7- Tree
2c927cd- Author
Edward G <edward.g2013@gmail.com>- Committer
Edward G <edward.g2013@gmail.com>- Parent
680e888
3 files changed+9 added−15 removed
modified:docs/option-decorators.rst+1 added-1 removed
79 unmodified lines80 click.echo('Dropped all tables!')81 82 Version Option83 ----------------84-:func:`version_option` adds a --version option which immediately prints the version number and exits the program.84+:func:`version_option` adds a ``--version`` option which immediately prints the version number and exits the program.modified:docs/options.rst+5 added-13 removed
281 unmodified lines282 invoke(info, args=['--help'])283 284 Flag Value285 ---------------286-To have an flag pass a value to the underlying function set ``flag_value`` to the value desired. This automatically sets ``is_flag=True``. To set a default flag, set ``default=True``. Setting flag values can be used to create patterns like this:286+To have an flag pass a value to the underlying function set ``flag_value``. This automatically sets ``is_flag=True``. To set a default flag, set ``default=True``. Setting flag values can be used to create patterns like this:287 288 .. click:example::289 290 import sys40 unmodified lines331 invoke(greet, env={'ALT_USERNAME': 'Bill', 'USERNAME': 'john'})332 333 Auto Envvar Prefix334 --------------------335-336----move to context section337-338-335 Automatically built environment variables are supported for options only. To enable this feature, the ``auto_envvar_prefix`` parameter needs to be passed to the script that is invoked. Each command and parameter is then added as an uppercase underscore-separated variable. If you have a subcommand336 called ``run`` taking an option called ``reload`` and the prefix is ``WEB``, then the variable is ``WEB_RUN_RELOAD``.337 338 Example usage:54 unmodified lines393 394 The default implementation for all types is to split on whitespace. The395 exceptions to this rule are the :class:`File` and :class:`Path` types396 which both split according to the operating system's path splitting rules.401-On Unix systems like Linux and OS X, the splitting happens for those on402-every colon (``:``), and for Windows, on every semicolon (``;``).397+On Unix systems like Linux and OS X, the splitting happens on398+every colon (``:``), and for Windows, splitting on every semicolon (``;``).399 404-Example usage:405-400 .. click:example::401 402 @click.command()403 @click.option('paths', '--path', envvar='PATHS', multiple=True,4 unmodified lines408 409 if __name__ == '__main__':410 perform()411 418-And from the command line:419-412 .. click:run::413 414 import os415 invoke(perform, env={"PATHS": f"./foo/bar{os.path.pathsep}./test"})27 unmodified lines443 providing only the option's flag without a value will either show a444 prompt or use its ``flag_value``.445 446 Setting ``is_flag=False, flag_value=value`` tells Click that the option455-can still be passed a value, but if only the flag is given the456-``flag_value`` is used.447+can still be passed a value, but only if the flag is given the448+``flag_value``.449 450 .. click:example::451 452 @click.command()9 unmodified linesmodified:docs/prompts.rst+3 added-1 removed
19 unmodified lines20 Option Prompts21 --------------22 23 Option prompts are integrated into the option interface. Internally, it24-automatically calls either :func:`prompt` or :func:`confirm` as necessary. In some cases, you want parameters that can be provided from the command line,24+automatically calls either :func:`prompt` or :func:`confirm` as necessary.25+26+In some cases, you want parameters that can be provided from the command line,27 but if not provided, ask for user input instead. This can be implemented with28 Click by defining a prompt string.29 30 Example:132 unmodified lines