diff --git a/src/command_modules/azure-cli-interactive/HISTORY.rst b/src/command_modules/azure-cli-interactive/HISTORY.rst index 2db3c16f66a..f7605064586 100644 --- a/src/command_modules/azure-cli-interactive/HISTORY.rst +++ b/src/command_modules/azure-cli-interactive/HISTORY.rst @@ -6,6 +6,7 @@ Release History 0.3.18 ++++++ * Completions kick in as soon as command table loading is done. +* Fix bug with using `--style` parameter. 0.3.17 ++++++ diff --git a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/__init__.py b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/__init__.py index 083a32380b5..e9a1a84e635 100644 --- a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/__init__.py +++ b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/__init__.py @@ -26,13 +26,13 @@ class InteractiveCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): super(InteractiveCommandsLoader, self).__init__(cli_ctx=cli_ctx) - def load_command_table(self, args): + def load_command_table(self, _): with self.command_group('', operations_tmpl='azure.cli.command_modules.interactive#{}') as g: g.command('interactive', 'start_shell') return self.command_table - def load_arguments(self, command): + def load_arguments(self, _): from azure.cli.command_modules.interactive.azclishell.color_styles import get_options as style_options diff --git a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/app.py b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/app.py index 8aee3c25985..46d53a5c85e 100644 --- a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/app.py +++ b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/app.py @@ -89,8 +89,8 @@ def __init__(self, cli_ctx, style=None, completer=None, self.cli_ctx = cli_ctx self.config = Configuration(cli_ctx.config, style=style) self.config.set_style(style) - self.styles = style or style_factory(self.config.get_style()) - self.lexer = lexer or get_az_lexer(self.config) if self.styles else None + self.style = style_factory(self.config.get_style()) + self.lexer = lexer or get_az_lexer(self.config) if self.style else None try: self.completer = completer or AzCompleter(self, GatherCommands(self.config)) self.completer.initialize_command_table_attributes() @@ -354,7 +354,7 @@ def create_application(self, full_layout=True): return Application( mouse_support=False, - style=self.styles, + style=self.style, buffer=writing_buffer, on_input_timeout=self.on_input_timeout, key_bindings_registry=InteractiveKeyBindings(self).registry,