mirror of https://github.com/dbcli/pgcli
Add fish-style autosuggestion.
This commit is contained in:
parent
69daf3ae0c
commit
925341cbce
|
@ -1,7 +1,15 @@
|
|||
Upcoming
|
||||
========
|
||||
|
||||
TBD
|
||||
Features:
|
||||
---------
|
||||
|
||||
* Add fish-style auto-suggestion from history. (Thanks: `Amjith Ramanujam`_)
|
||||
|
||||
Bug Fixes:
|
||||
----------
|
||||
|
||||
There are no bugs :)
|
||||
|
||||
1.7.0
|
||||
=====
|
||||
|
|
|
@ -18,6 +18,7 @@ def pgcli_bindings(get_vi_mode_enabled, set_vi_mode_enabled):
|
|||
key_binding_manager = KeyBindingManager(
|
||||
enable_open_in_editor=True,
|
||||
enable_system_bindings=True,
|
||||
enable_auto_suggest_bindings=True,
|
||||
enable_search=True,
|
||||
enable_abort_and_exit_bindings=True)
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ from prompt_toolkit.layout.lexers import PygmentsLexer
|
|||
from prompt_toolkit.layout.processors import (ConditionalProcessor,
|
||||
HighlightMatchingBracketProcessor)
|
||||
from prompt_toolkit.history import FileHistory
|
||||
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
|
||||
from pygments.lexers.sql import PostgresLexer
|
||||
from pygments.token import Token
|
||||
|
||||
|
@ -563,6 +564,7 @@ class PGCli(object):
|
|||
|
||||
with self._completer_lock:
|
||||
buf = PGBuffer(
|
||||
auto_suggest=AutoSuggestFromHistory(),
|
||||
always_multiline=self.multi_line,
|
||||
multiline_mode=self.multiline_mode,
|
||||
completer=self.completer,
|
||||
|
|
Loading…
Reference in New Issue