Use the `kbd` role for keyboard sequences in the docs
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Also adds a missing reference to `Ctrl+Z` on Windows, introduced by #3818
authored by Kevin Deldycke · committed by Kevin Deldycke · parent be13b15 · Browse files · 3 files·+8 added−8 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+8 added−8 removed
- other:+8 added−8 removed
Provenance
- Commit
fa99fbd- Tree
7eaeada- Author
Kevin Deldycke <kevin@deldycke.com>- Committer
Kevin Deldycke <kevin@deldycke.com>- Parent
be13b15
3 files changed+8 added−8 removed
modified:docs/complex.md+3 added-3 removed
348 unmodified lines349 and then resolve `baz`. Each subcommand resolution step does a lazy load.350 2. Helptext rendering. In order to get the short help description of subcommands,351 `cli --help` will load `foo` and `bar`. Note that it will still not load352 `baz`.353-3. Shell completion. In order to get the subcommands of a lazy command, `cli <TAB>`354- will need to resolve the subcommands of `cli`. This process will trigger the lazy355- loads.353+3. Shell completion. In order to get the subcommands of a lazy command, completing354+ `cli` with {kbd}`Tab` will need to resolve the subcommands of `cli`. This process355+ will trigger the lazy loads.356 357 ### Further Deferring Imports358 359 It is possible to make the process even lazier, but it is generally more difficult the27 unmodified linesmodified:docs/exceptions.md+2 added-2 removed
29 unmodified lines303132333435343536373839123 unmodified linesExpand all29 unmodified lines| --- | --- | --- || It returns | Exit with code ``0`` | Return the value of {meth}`Command.invoke` || It called {meth}`Context.exit` | Exit with the given code | Return the given code || It raised a {exc}`ClickException` | Call {meth}`ClickException.show`, then exit with {attr}`ClickException.exit_code` | Propagate it || The user pressed ``Ctrl-C``, which raises a {exc}`KeyboardInterrupt` | Print a blank line, then ``Aborted!`` to standard error, and exit with code ``1`` | Print a blank line, then raise {exc}`Abort` with the original exception as its ``__cause__`` || The user pressed ``Ctrl-D``, which raises an {exc}`EOFError` | The same as ``Ctrl-C`` | The same as ``Ctrl-C`` || The user pressed {kbd}`Ctrl+C`, which raises a {exc}`KeyboardInterrupt` | Print a blank line, then ``Aborted!`` to standard error, and exit with code ``1`` | Print a blank line, then raise {exc}`Abort` with the original exception as its ``__cause__`` || The user pressed {kbd}`Ctrl+D`, or {kbd}`Ctrl+Z` on Windows, which raises an {exc}`EOFError` | The same as {kbd}`Ctrl+C` | The same as {kbd}`Ctrl+C` || It raised an {exc}`Abort` | Print ``Aborted!`` to standard error, and exit with code ``1`` | Propagate it || The output pipe closed early, which raises an {exc}`OSError` with ``EPIPE`` | Silence the flush errors, and exit with code ``1`` | The same || It raised any other exception | Propagate it | Propagate it |
123 unmodified linesExpand allmodified:docs/utils.md+3 added-3 removed
176 unmodified lines177 click.echo('Invalid input :(')178 ```179 180 Note that this reads raw input, which means that things like arrow keys will show up in the platform's native escape181-format. The only characters translated are `^C` and `^D` which are converted into keyboard interrupts and end of file182-exceptions respectively. This is done because otherwise, it's too easy to forget about that and to create scripts that183-cannot be properly exited.181+format. The only characters translated are the ones produced by {kbd}`Ctrl+C` and {kbd}`Ctrl+D`, or {kbd}`Ctrl+Z` on182+Windows, which are converted into keyboard interrupts and end of file exceptions respectively. This is done because183+otherwise, it's too easy to forget about that and to create scripts that cannot be properly exited.184 185 ## Waiting for Key Press186 187 ```{versionadded} 2.0202 unmodified lines