mirror of
https://github.com/dbcli/pgcli
synced 2024-06-24 02:03:20 +00:00
Upgrade to prompt_toolkit 0.46
This commit is contained in:
parent
cec4e0bd0e
commit
954fc158fa
|
@ -14,6 +14,7 @@ def pgcli_bindings(get_vi_mode_enabled, set_vi_mode_enabled):
|
||||||
|
|
||||||
key_binding_manager = KeyBindingManager(
|
key_binding_manager = KeyBindingManager(
|
||||||
enable_open_in_editor=True,
|
enable_open_in_editor=True,
|
||||||
|
enable_system_bindings=True,
|
||||||
enable_vi_mode=Condition(lambda cli: get_vi_mode_enabled()))
|
enable_vi_mode=Condition(lambda cli: get_vi_mode_enabled()))
|
||||||
|
|
||||||
@key_binding_manager.registry.add_binding(Keys.F2)
|
@key_binding_manager.registry.add_binding(Keys.F2)
|
||||||
|
|
|
@ -246,6 +246,7 @@ class PGCli(object):
|
||||||
get_prompt_tokens=prompt_tokens,
|
get_prompt_tokens=prompt_tokens,
|
||||||
get_bottom_toolbar_tokens=get_toolbar_tokens,
|
get_bottom_toolbar_tokens=get_toolbar_tokens,
|
||||||
display_completions_in_columns=self.wider_completion_menu,
|
display_completions_in_columns=self.wider_completion_menu,
|
||||||
|
multiline=True,
|
||||||
extra_input_processors=[
|
extra_input_processors=[
|
||||||
# Highlight matching brackets while editing.
|
# Highlight matching brackets while editing.
|
||||||
ConditionalProcessor(
|
ConditionalProcessor(
|
||||||
|
@ -260,7 +261,8 @@ class PGCli(object):
|
||||||
application = Application(style=style_factory(self.syntax_style, self.cli_style),
|
application = Application(style=style_factory(self.syntax_style, self.cli_style),
|
||||||
layout=layout, buffer=buf,
|
layout=layout, buffer=buf,
|
||||||
key_bindings_registry=key_binding_manager.registry,
|
key_bindings_registry=key_binding_manager.registry,
|
||||||
on_exit=AbortAction.RAISE_EXCEPTION)
|
on_exit=AbortAction.RAISE_EXCEPTION,
|
||||||
|
ignore_case=True)
|
||||||
cli = CommandLineInterface(application=application,
|
cli = CommandLineInterface(application=application,
|
||||||
eventloop=create_eventloop())
|
eventloop=create_eventloop())
|
||||||
|
|
||||||
|
|
|
@ -51,14 +51,20 @@ Token.Menu.Completions.Completion.Current = 'bg:#ffffff #000000'
|
||||||
Token.Menu.Completions.Completion = 'bg:#008888 #ffffff'
|
Token.Menu.Completions.Completion = 'bg:#008888 #ffffff'
|
||||||
Token.Menu.Completions.Meta.Current = 'bg:#44aaaa #000000'
|
Token.Menu.Completions.Meta.Current = 'bg:#44aaaa #000000'
|
||||||
Token.Menu.Completions.Meta = 'bg:#448888 #ffffff'
|
Token.Menu.Completions.Meta = 'bg:#448888 #ffffff'
|
||||||
|
Token.Menu.Completions.MultiColumnMeta = 'bg:#aaffff #000000'
|
||||||
Token.Menu.Completions.ProgressButton = 'bg:#003333'
|
Token.Menu.Completions.ProgressButton = 'bg:#003333'
|
||||||
Token.Menu.Completions.ProgressBar = 'bg:#00aaaa'
|
Token.Menu.Completions.ProgressBar = 'bg:#00aaaa'
|
||||||
Token.SelectedText = '#ffffff bg:#6666aa'
|
Token.SelectedText = '#ffffff bg:#6666aa'
|
||||||
Token.IncrementalSearchMatch = '#ffffff bg:#4444aa'
|
Token.SearchMatch = '#ffffff bg:#4444aa'
|
||||||
Token.IncrementalSearchMatch.Current = '#ffffff bg:#44aa44'
|
Token.SearchMatch.Current = '#ffffff bg:#44aa44'
|
||||||
Token.Toolbar = 'bg:#222222 #aaaaaa'
|
Token.Toolbar = 'bg:#222222 #aaaaaa'
|
||||||
Token.Toolbar.Off = 'bg:#222222 #888888'
|
Token.Toolbar.Off = 'bg:#222222 #888888'
|
||||||
Token.Toolbar.On = 'bg:#222222 #ffffff'
|
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 are queries you can execute by name.
|
||||||
[named queries]
|
[named queries]
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -25,7 +25,7 @@ setup(
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'click >= 4.1',
|
'click >= 4.1',
|
||||||
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
|
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
|
||||||
'prompt_toolkit==0.45',
|
'prompt_toolkit==0.46',
|
||||||
'psycopg2 >= 2.5.4',
|
'psycopg2 >= 2.5.4',
|
||||||
'sqlparse == 0.1.16',
|
'sqlparse == 0.1.16',
|
||||||
'configobj >= 5.0.6'
|
'configobj >= 5.0.6'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user