Show More
@@ -317,6 +317,11 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
317 | 317 | help="Allows to enable/disable the prompt toolkit history search" |
|
318 | 318 | ).tag(config=True) |
|
319 | 319 | |
|
320 | enable_autosuggestions = Bool(True, | |
|
321 | help="Allows to enable/disable the prompt autosuggestions based on " | |
|
322 | "the prompt toolkit history.", | |
|
323 | ).tag(config=True) | |
|
324 | ||
|
320 | 325 | prompt_includes_vi_mode = Bool(True, |
|
321 | 326 | help="Display the current vi mode (when using vi editing mode)." |
|
322 | 327 | ).tag(config=True) |
@@ -370,11 +375,16 b' class TerminalInteractiveShell(InteractiveShell):' | |||
|
370 | 375 | self._style = self._make_style_from_name_or_cls(self.highlighting_style) |
|
371 | 376 | self.style = DynamicStyle(lambda: self._style) |
|
372 | 377 | |
|
378 | if self.enable_autosuggestions: | |
|
379 | auto_suggest = AutoSuggestFromHistory() | |
|
380 | else: | |
|
381 | auto_suggest = None | |
|
382 | ||
|
373 | 383 | editing_mode = getattr(EditingMode, self.editing_mode.upper()) |
|
374 | 384 | |
|
375 | 385 | self.pt_loop = asyncio.new_event_loop() |
|
376 | 386 | self.pt_app = PromptSession( |
|
377 |
auto_suggest= |
|
|
387 | auto_suggest=auto_suggest, | |
|
378 | 388 | editing_mode=editing_mode, |
|
379 | 389 | key_bindings=key_bindings, |
|
380 | 390 | history=history, |
General Comments 0
You need to be logged in to leave comments.
Login now