Azure / Azure/azure-cli-extensions

`az interactive`: add flag to clear the cache

Open
#473 7 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
customer-reported enhancement extension/interactive feature-request
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

# Describe the bug

az group delete --name mygroup

works as a command, but not inside `az interactive`.

az group delete --help

returns

Arguments
--name --resource-group -g -n [Required] : Name of resource group. You can configure the default

This clearly means that *either* `--name` or `--resource-group` is an acceptable flag for the name of the resource group you want to delete.

And `az group delete --name mygroup` does work.

If you run `az interactive` and type `group delete --` the suggestions are

```
az>> group delete --name draw-demo
--name [Required] Name of resource group. You can configure the default group using `az configure --defaults group=> group delete --name mygroup
az group delete: error: the following arguments are required: --resource-group/-g
usage: az group delete [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv,yaml}]
[--query JMESPATH] --resource-group RESOURCE_GROUP_NAME
[--yes] [--no-wait] [--subscription _SUBSCRIPTION]

```

# To Reproduce

```
$ az interactive
az>> group delete --name mygroup
```

# Expected behavior

Group is successfully deleted

# Actual Behavior

```
az group delete: error: the following arguments are required: --resource-group/-g
usage: az group delete [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv,yaml}]
[--query JMESPATH] --resource-group RESOURCE_GROUP_NAME
[--yes] [--no-wait] [--subscription _SUBSCRIPTION]

```

# Environment summary

* Ubuntu 18
* installed based on the official instructions
* `az --version`:

```
azure-cli (2.0.54)
...

Extensions:
interactive (0.4.1)
...
Python (Linux) 3.6.5
```

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.