Autocomplete in macOS Sonoma is not completing values of things like resource groups. For example, the following is happening:
~ > az aks show -g -
Entering tab added a hyphen to type the next flag rather than autocompleting values. Trying to give the first two characters of a resource group that exists does not complete anything, and just sounds the terminal bell.
This was previously working, but I"m not sure if an update to the cli or to python is what may have made this stop working.
Relevant .zshrc configuration:
# Load tabcomplete
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
autoload -Uz compinit && compinit
autoload -U +X bashcompinit && bashcompinit
fi
# Az cli autocomplete
source $(brew --prefix)/etc/bash_completion.d/az
Related command
az aks show --resource-group <tab>
az vm show --resource-group <tab>
Errors
No errors, but a hyphen is entered in place of a name value.
Issue script & Debug output
cli.knack.cli: Command arguments: ['aks', 'show', '-g', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1016f9580>, <function OutputProducer.on_global_arguments at 0x1017a4720>, <function CLIQuery.on_global_arguments at 0x1017ce200>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'aks': ['azure.cli.command_modules.acs']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acs 0.024 14 76
cli.azure.cli.core: Total (1) 0.024 14 76
cli.azure.cli.core: Loaded 14 groups, 76 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : aks show
cli.azure.cli.core: Command table: aks show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x10250efc0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/michaelsaul/.azure/commands/2024-04-16.12-41-14.aks_show.75763.log'.
az_command_data_logger: command args: aks show -g --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x102539a80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x10255fce0>, <function register_cache_arguments..add_cache_arguments at 0x10255fe20>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22aks+show%22%2C+%22parameters%22%3A+%22--resource-group%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.59.0%22%2C+%22errorType%22%3A+%22ExpectedArgument%22%2C+%22correlationId%22%3A+%22e31faaf4-d42e-4abf-b565-a9264c677ea9%22%2C+%22eventId%22%3A+%22c3511034-1ec3-47f4-84b0-0a3154e70579%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1907, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2128, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2058, in consume_optional
arg_count = match_argument(action, selected_patterns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2222, in _match_argument
raise ArgumentError(action, msg)
argparse.ArgumentError: argument --resource-group/-g: expected one argument
cli.azure.cli.core.azclierror: argument --resource-group/-g: expected one argument
az_command_data_logger: argument --resource-group/-g: expected one argument
Examples from AI knowledge base:
az aks show --name MyManagedCluster --resource-group MyResourceGroup
Show the details for a managed Kubernetes cluster
https://docs.microsoft.com/en-US/cli/azure/aks#az_aks_show
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x10250f240>]
az_command_data_logger: exit code: 2
cli.main: Command ran in 0.351 seconds (init: 0.060, invoke: 0.292)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3726 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/init.py /Users/michaelsaul/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
The name of a resource group, vm, aks cluster, etc. will be autocompleted
Environment Summary
az --version
azure-cli 2.59.0
core 2.59.0
telemetry 1.1.0
Extensions:
init 0.1.0
Dependencies:
msal 1.27.0
azure-mgmt-resource 23.1.0b2
Python location '/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/bin/python'
Extensions directory '/Users/michaelsaul/.azure/cliextensions'
Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
Autocomplete in macOS Sonoma is not completing values of things like resource groups. For example, the following is happening:
~ > az aks show -g -Entering tab added a hyphen to type the next flag rather than autocompleting values. Trying to give the first two characters of a resource group that exists does not complete anything, and just sounds the terminal bell.
This was previously working, but I"m not sure if an update to the cli or to python is what may have made this stop working.
Relevant .zshrc configuration:
Related command
Errors
No errors, but a hyphen is entered in place of a name value.
Issue script & Debug output
cli.knack.cli: Command arguments: ['aks', 'show', '-g', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1016f9580>, <function OutputProducer.on_global_arguments at 0x1017a4720>, <function CLIQuery.on_global_arguments at 0x1017ce200>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'aks': ['azure.cli.command_modules.acs']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acs 0.024 14 76
cli.azure.cli.core: Total (1) 0.024 14 76
cli.azure.cli.core: Loaded 14 groups, 76 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : aks show
cli.azure.cli.core: Command table: aks show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x10250efc0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/michaelsaul/.azure/commands/2024-04-16.12-41-14.aks_show.75763.log'.
az_command_data_logger: command args: aks show -g --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x102539a80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x10255fce0>, <function register_cache_arguments..add_cache_arguments at 0x10255fe20>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22aks+show%22%2C+%22parameters%22%3A+%22--resource-group%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.59.0%22%2C+%22errorType%22%3A+%22ExpectedArgument%22%2C+%22correlationId%22%3A+%22e31faaf4-d42e-4abf-b565-a9264c677ea9%22%2C+%22eventId%22%3A+%22c3511034-1ec3-47f4-84b0-0a3154e70579%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1907, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2128, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2058, in consume_optional
arg_count = match_argument(action, selected_patterns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2222, in _match_argument
raise ArgumentError(action, msg)
argparse.ArgumentError: argument --resource-group/-g: expected one argument
cli.azure.cli.core.azclierror: argument --resource-group/-g: expected one argument
az_command_data_logger: argument --resource-group/-g: expected one argument
Examples from AI knowledge base:
az aks show --name MyManagedCluster --resource-group MyResourceGroup
Show the details for a managed Kubernetes cluster
https://docs.microsoft.com/en-US/cli/azure/aks#az_aks_show
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x10250f240>]
az_command_data_logger: exit code: 2
cli.main: Command ran in 0.351 seconds (init: 0.060, invoke: 0.292)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3726 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.59.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/init.py /Users/michaelsaul/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
The name of a resource group, vm, aks cluster, etc. will be autocompleted
Environment Summary
az --version
azure-cli 2.59.0
core 2.59.0
telemetry 1.1.0
Extensions:
init 0.1.0
Dependencies:
msal 1.27.0
azure-mgmt-resource 23.1.0b2
Python location '/opt/homebrew/Cellar/azure-cli/2.59.0/libexec/bin/python'
Extensions directory '/Users/michaelsaul/.azure/cliextensions'
Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response