1
0
mirror of https://github.com/dbcli/pgcli synced 2024-06-16 01:42:23 +00:00

Upgrade to prompt_toolkit 0.46

This commit is contained in:
Jonathan Slenders 2015-08-08 22:12:55 +02:00
parent cec4e0bd0e
commit 954fc158fa
4 changed files with 13 additions and 4 deletions

View File

@ -14,6 +14,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_vi_mode=Condition(lambda cli: get_vi_mode_enabled()))
@key_binding_manager.registry.add_binding(Keys.F2)

View File

@ -246,6 +246,7 @@ class PGCli(object):
get_prompt_tokens=prompt_tokens,
get_bottom_toolbar_tokens=get_toolbar_tokens,
display_completions_in_columns=self.wider_completion_menu,
multiline=True,
extra_input_processors=[
# Highlight matching brackets while editing.
ConditionalProcessor(
@ -260,7 +261,8 @@ class PGCli(object):
application = Application(style=style_factory(self.syntax_style, self.cli_style),
layout=layout, buffer=buf,
key_bindings_registry=key_binding_manager.registry,
on_exit=AbortAction.RAISE_EXCEPTION)
on_exit=AbortAction.RAISE_EXCEPTION,
ignore_case=True)
cli = CommandLineInterface(application=application,
eventloop=create_eventloop())

View File

@ -51,14 +51,20 @@ Token.Menu.Completions.Completion.Current = 'bg:#ffffff #000000'
Token.Menu.Completions.Completion = 'bg:#008888 #ffffff'
Token.Menu.Completions.Meta.Current = 'bg:#44aaaa #000000'
Token.Menu.Completions.Meta = 'bg:#448888 #ffffff'
Token.Menu.Completions.MultiColumnMeta = 'bg:#aaffff #000000'
Token.Menu.Completions.ProgressButton = 'bg:#003333'
Token.Menu.Completions.ProgressBar = 'bg:#00aaaa'
Token.SelectedText = '#ffffff bg:#6666aa'
Token.IncrementalSearchMatch = '#ffffff bg:#4444aa'
Token.IncrementalSearchMatch.Current = '#ffffff bg:#44aa44'
Token.SearchMatch = '#ffffff bg:#4444aa'
Token.SearchMatch.Current = '#ffffff bg:#44aa44'
Token.Toolbar = 'bg:#222222 #aaaaaa'
Token.Toolbar.Off = 'bg:#222222 #888888'
Token.Toolbar.On = 'bg:#222222 #ffffff'
Token.Toolbar.Search = 'noinherit bold'
Token.Toolbar.Search.Text = 'nobold'
Token.Toolbar.System = 'noinherit bold'
Token.Toolbar.Arg = 'noinherit bold'
Token.Toolbar.Arg.Text = 'nobold'
# Named queries are queries you can execute by name.
[named queries]

View File

@ -25,7 +25,7 @@ setup(
install_requires=[
'click >= 4.1',
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
'prompt_toolkit==0.45',
'prompt_toolkit==0.46',
'psycopg2 >= 2.5.4',
'sqlparse == 0.1.16',
'configobj >= 5.0.6'