Merge pull request #104 from julen/doc-fixes
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 · parents e183ab0, cb88b40 · Browse files · 4 files·+7 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Docs: several fixes
Diff stats
4 files+7 added−7 removed
- other:+7 added−7 removed
Provenance
- Commit
209faf4- Tree
760b2e0- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent 1
e183ab0- Parent 2
cb88b40
4 files changed+7 added−7 removed
modified:click/core.py+2 added-2 removed
111 unmodified lines112 :param terminal_width: the width of the terminal. The default is113 inherit from parent context. If no context114 defines the terminal width then auto115 detection will be applied.116- :param resilient_parsing: if this flag is enabled then the click will116+ :param resilient_parsing: if this flag is enabled then click will117 parse without any interactivity or callback118 invocation. This is useful for implementing119 things such as completion support.120 """30 unmodified lines151 #: The width of the terminal (None is autodetection).152 self.terminal_width = terminal_width153 154 #: Indicates if resilient parsing is enabled. In that case click155- #: will do it's best to not cause any failures.155+ #: will do its best to not cause any failures.156 self.resilient_parsing = resilient_parsing157 158 # If there is no envvar prefix yet, but the parent has one and159 # the command on this level has a name, we can expand the envvar1094 unmodified linesmodified:click/termui.py+2 added-2 removed
444 unmodified lines445 will always return a unicode character and under certain rare446 circumstances this might return more than one character. The447 situations which more than one character is returned is when for448 whatever reason multiple characters end up in the terminal buffer or449- standard in was not actually a terminal.449+ standard input was not actually a terminal.450 451 Note that this will always read from the terminal, even if something452 is piped into the standard input.453 454 .. versionadded:: 2.0455 456- :param echo: if set to True the character read will also show up on456+ :param echo: if set to `True` the character read will also show up on457 the terminal. The default is not not show it.458 """459 f = _getchar460 if f is None:2 unmodified linesmodified:docs/bashcomplete.rst+2 added-2 removed
2 unmodified lines3 4 .. versionadded:: 2.05 6 Starting with click 2.0 there is built-in support for bash completion for7-any Click script. There are certain restrictions on when this completion7+any click script. There are certain restrictions on when this completion8 is available but for the most part it should just work.9 10 Limitations11 -----------29 unmodified lines41 with dashes replaced by underscores.42 43 So if your tool is called ``foo-bar`` then the magic variable is called44 ``_FOO_BAR_COMPLETE``. By exporting it with the ``source`` value it will45-spit out the activation script which can be trivally be activated.45+spit out the activation script which can be trivally activated.46 47 For instance to enable bash completion for your ``foo-bar`` script, this48 is what you would need to put into your ``.bashrc``::49 20 unmodified linesmodified:docs/utils.rst+1 added-1 removed
120 unmodified lines121 to do that and instead read individual characters as they are being122 written.123 124 For this click provides the :func:`getchar` function which reads a single125-character from the terminal buffer and returns it as unicode character.125+character from the terminal buffer and returns it as a unicode character.126 127 Note that this function will always read from the terminal, even if stdin128 is instead a pipe.129 186 unmodified lines