Azure / Azure/azure-cli

az config set -h | in-line help showing Bash-only example with no indication of environment

Open
#30,726 2 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-codegen-extensibility-squad Auto-Assign Auto-Resolve Azure CLI Team Configure question
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

The command `az config set -h` instructions our customers to use `az find "az config set"` to search our AI knowledge base for examples. However, this syntax example doesn't run in PowerShell, only Bash.

With quotes in PowerShell -->

![Image](https://github.com/user-attachments/assets/b2d02aef-47b9-4533-ac23-394ba7513ef6)

Without quotes in PowerShell -->

![Image](https://github.com/user-attachments/assets/3627fafb-1b30-422e-912f-e7d919f605ac)

With quotes in Bash -->

![Image](https://github.com/user-attachments/assets/43c9f9cd-1e5d-4171-8fd9-c36338e9469f)

### Request to engineering

Please change the instructions to `To search AI knowledge base for examples, in Bash run: az find "az config set"`

Although we would like to assume in all our conceptual docs and reference examples that customers are running Bash, they simply are not. We are addressing this in our conceptual content by having environment-specific code block tags. (Even if 95% of them will say `Azure CLI with Bash` we have gained clarity for our 25% of `Azure CLI with PowerShell` code blocks). In-line help does not have this distinction capability, so we need to specify an environment when we provide in-line command examples.

### Related command

az config set

### Errors

The command example fails in PowerShell with double quotes, single quotes and no quotes.

![Image](https://github.com/user-attachments/assets/ca456f9b-9def-48f0-84e5-c0798f8f643d)

![Image](https://github.com/user-attachments/assets/221458b9-14ec-4e64-bcfe-28bffdf056ea)

![Image](https://github.com/user-attachments/assets/bdda5347-1362-4f5d-af72-de2be7879aaf)

### Issue script & Debug output

.

### Expected behavior

The equivalent Bash output.

![Image](https://github.com/user-attachments/assets/89c68bba-3ede-45d7-a8fc-db3793678d84)

### Environment Summary

{
"azure-cli": "2.66.0",
"azure-cli-core": "2.66.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"alias": "0.5.2"
}
}

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.