Skip to content

Commit 4f48329

Browse files
committed
Revert "remove in-progess page"
This reverts commit 06bcd62.
1 parent 06bcd62 commit 4f48329

6 files changed

Lines changed: 98 additions & 0 deletions

File tree

docs-ref-conceptual/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Get started](get-started-with-azure-cli.md)
44
## [Log in](authenticate-azure-cli.md)
55
### [Create a service principal](create-an-azure-service-principal-azure-cli.md)
6+
## [Interactive mode](interactive-azure-cli.md)
67
## [Output formats](format-output-azure-cli.md)
78
## [Query](query-azure-cli.md)
89
## [Subscriptions](manage-azure-subscriptions-azure-cli.md)
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
title: Azure CLI 2.0 Interactive Mode
3+
description: Use Azure CLI 2.0 in interactive mode.
4+
keywords: Azure CLI 2.0, interactive mode
5+
author: rloutlaw
6+
ms.author: routlaw
7+
manager: douge
8+
ms.date: 04/06/2017
9+
ms.topic: article
10+
ms.prod: azure
11+
ms.technology: azure
12+
ms.devlang: azurecli
13+
ms.service: multiple
14+
ms.assetid:
15+
---
16+
17+
# Interactive Azure CLI 2.0
18+
19+
You can use Azure CLI 2.0 in interactive mode by running the `az interactive` command.
20+
That places you in an interactive shell where your commands are auto-completed
21+
and you have access to descriptions of commands and their parameters and command examples.
22+
23+
![interactive mode](./media/interactive-azure-cli/webapp-create.png)
24+
25+
If you're not already logged in to your account, use the `login` command to do that.
26+
27+
## Configure
28+
29+
Interactive mode optionally displays command descriptions, parameter descriptions, and command examples.
30+
You can turn descriptions and examples on or off using `F1`.
31+
32+
![descriptions and examples](./media/interactive-azure-cli/descriptions-and-examples.png)
33+
34+
You can turn the display of parameter defaults on or off using `F2`.
35+
36+
![defaults](./media/interactive-azure-cli/defaults.png)
37+
38+
`F3` toggles the display of some key gestures.
39+
40+
![gestures](./media/interactive-azure-cli/gestures.png)
41+
42+
## Scope
43+
44+
You can scope your interactive mode to a specific command group like `vm` or `vm image`.
45+
When you do, all commands are interpreted in that scope.
46+
It's a great shorthand if you're doing all your work in that command group.
47+
48+
Instead of typing these commands:
49+
50+
```azure-cli
51+
az>> vm create -n myVM -g myRG --image UbuntuLTS
52+
az>> vm list -o table
53+
```
54+
55+
You can scope to the vm command group and type these commands:
56+
57+
```azure-cli
58+
az>> %%vm
59+
az vm>> create -n myVM -g myRG --image UbuntuLTS
60+
az vm>>list -o table
61+
```
62+
63+
You can scope to lower-level command groups as well.
64+
You could scope to `vm image` using `%%vm image`.
65+
In this case, since we're already scoped to `vm`, we would use `%%image`.
66+
67+
```azure-cli
68+
az vm>> %%image
69+
az vm image>>
70+
```
71+
72+
At that point, we can pop the scope back up to `vm` using `%%..`,
73+
or we can scope to the root with just `%%`.
74+
75+
```azure-cli
76+
az vm image>> %%
77+
az>>
78+
```
79+
80+
## Query
81+
82+
You can execute a JMESPath query on the results of the last command that you executed.
83+
For example, after you create a VM, you can make sure it has fully provisioned.
84+
85+
```azure-cli
86+
az>> vm create --name myVM --resource-group myRG --image UbuntuLTS --no-wait
87+
az>> ? [*].provisioningState
88+
```
89+
90+
```
91+
[
92+
"Creating"
93+
]
94+
```
95+
96+
To learn more about querying the results of your commands,
97+
see [Query command results with Azure 2.0](query-azure-cli.md).
10.6 KB
Loading
14.8 KB
Loading
19.4 KB
Loading
34.6 KB
Loading

0 commit comments

Comments
 (0)