Skip to content
Myr

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

3 files+8 added−8 removed

modified:docs/complex.md+3 added-3 removed
348 unmodified lines
349 and then resolve `baz`. Each subcommand resolution step does a lazy load.3502. 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`.3533. 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.3533. 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.356357### Further Deferring Imports358359It is possible to make the process even lazier, but it is generally more difficult the
27 unmodified lines
modified:docs/exceptions.md+2 added-2 removed
modified:docs/utils.md+3 added-3 removed
176 unmodified lines
177 click.echo('Invalid input :(')178```179180Note that this reads raw input, which means that things like arrow keys will show up in the platform's native escape181format. The only characters translated are `^C` and `^D` which are converted into keyboard interrupts and end of file182exceptions respectively. This is done because otherwise, it's too easy to forget about that and to create scripts that183cannot be properly exited.181format. The only characters translated are the ones produced by {kbd}`Ctrl+C` and {kbd}`Ctrl+D`, or {kbd}`Ctrl+Z` on182Windows, which are converted into keyboard interrupts and end of file exceptions respectively. This is done because183otherwise, it's too easy to forget about that and to create scripts that cannot be properly exited.184185## Waiting for Key Press186187```{versionadded} 2.0
202 unmodified lines