Skip to content
Merged
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
7 changes: 6 additions & 1 deletion src/azure-cli-core/azure/cli/core/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def execute(self, args):
command_preserve_casing = roughly_parse_command_with_casing(args)
args = _pre_command_table_create(self.cli_ctx, args)

if self._should_use_command_index() and self._is_top_level_help_request(args):
if self._should_show_cached_help(args):
result = self._try_show_cached_help(command_preserve_casing, args)
if result:
return result
Expand Down Expand Up @@ -735,6 +735,11 @@ def _should_use_command_index(self):
"""Check if command index optimization is enabled."""
return self.cli_ctx.config.getboolean('core', 'use_command_index', fallback=True)

def _should_show_cached_help(self, args):
return (self._should_use_command_index() and
self._is_top_level_help_request(args) and
not self.cli_ctx.data.get('completer_active'))

def _try_show_cached_help(self, command_preserve_casing, args):
"""Try to show cached help for top-level help request.

Expand Down