Skip to content

Autocomplete is slow when command is not complete #24762

@bebound

Description

@bebound

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

If I press TAB after az account cle, it takes 4seconds to show suggestion az account clear. However az account -h only takes 2seconds.

The debug log shows that it reloads modules and extensions when run az account cle --debug.

cli.azure.cli.core: Could not find a match in the command or command group table for 'account cle'. The index may be outdated.
cli.azure.cli.core: Loading command modules:

I think we can make reload rules stricter. When _ARGCOMPLETE=1, if account cle is not found, check if account is matched. If still not matched, reload.

Related issue: #9157

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions