Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --style parameter for az interactive command #5809

Merged
merged 1 commit into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/command_modules/azure-cli-interactive/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,
Expand Down