File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,17 @@ wrapped into a :class:`~prompt_toolkit.lexers.PygmentsLexer`.
120120Auto- completion
121121-------------- -
122122
123- Now we are going to add auto completion. We' d like a drop down menu of
124- `possible keywords < https:// www.sqlite.org/ lang_keywords.html> ` _ when the user
125- is typing.
123+ Now we are going to add auto completion. We' d like to display a drop down menu
124+ of `possible keywords < https:// www.sqlite.org/ lang_keywords.html> ` _ when the
125+ user starts typing.
126126
127- Create your `` sql_completer`` instance from the `` WordCompleter`` class
128- defining a set of `` keywords`` for auto- completion.
127+ We can do this by creating an `sql_completer` object from the
128+ :class :`~ prompt_toolkit.completion.WordCompleter` class , defining a set of
129+ `keywords` for the auto- completion.
129130
130131Like the lexer, this `` sql_completer`` instance can be passed to either the
131132:class :`~ prompt_toolkit.shortcuts.PromptSession` class or the
132- :meth:`~ prompt_toolkit.shortcuts.PromptSession.prompt` method
133+ :meth:`~ prompt_toolkit.shortcuts.PromptSession.prompt` method.
133134
134135.. code:: python
135136
@@ -181,7 +182,7 @@ Like the lexer, this ``sql_completer`` instance can be passed to either the
181182.. image:: ../ ../ images/ repl/ sqlite- 4. png
182183
183184In about 30 lines of code we got ourselves an auto completing, syntax
184- highlighting REPL . Let' s make it better.
185+ highlighting REPL . Let' s make it even better.
185186
186187
187188Styling the menus
You can’t perform that action at this time.
0 commit comments