Skip to content

Commit 685e05b

Browse files
authored
Update README.md
1 parent ce9318a commit 685e05b

File tree

1 file changed

+31
-18
lines changed

1 file changed

+31
-18
lines changed

README.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,43 +36,56 @@ Not all documentation is suitable for conversion to Exec Docs. Use these filters
3636
**Example:**
3737
```markdown
3838
```bash
39-
az group create --name myResourceGroup --location eastus
39+
export REGION="eastus"
40+
export RESOURCE_GROUP="myResourceGroup"
41+
az group create --name $RESOURCE_GROUP --location $REGION
4042
```
4143
```
4244

43-
>**Note:** This rule does not apply to output code blocks, which are used to display the results of commands, scripts, or other operations. These blocks help in illustrating what the expected output should look like. They include, but are not limited to, the following types: _output, json, yaml, console, text, and log._
44-
45-
>**Note:** While Innovation Engine can _parse_ a code block of any type, given its current features, it can only _execute_ code blocks of the types above. So, it is important to ensure that the code blocks in your Exec Doc are of the types above.
45+
>**Note:** You can include code blocks of any type in your documentation for human readers, but only the types listed above will be executed by Innovation Engine. Other code block types will be displayed but ignored during execution.
46+
47+
>**Note:** There is a special kind of code block called a "result block" that's used to validate command execution. We'll cover result blocks in detail later in section 11.
4648
4749
2. **Command Execution Limitations**
48-
- **Not supported for direct execution:**
50+
- **Not supported:**
4951
- PowerShell scripts
5052
- GUI-based instructions
51-
- Direct code blocks containing Python, SQL, or other languages (these should be executed via BASH commands)
53+
- Commands requiring `sudo` privileges
54+
- Direct code blocks of languages that aren't bash/shell commands
5255

53-
- **Supported execution context:**
54-
- Commands that run in a Linux/bash environment
56+
- **Supported:**
57+
- Any command that can run in a BASH terminal
5558
- Azure CLI commands
56-
- Terraform commands (works without any special setup)
59+
- Terraform commands
5760
- Python scripts executed via BASH (e.g., `python myApp.py`)
5861
- SQL queries executed via database CLI tools
5962

6063
**Example of supported command:**
6164
```markdown
6265
```bash
63-
export VM_NAME="myVM"
64-
az vm create --name $VM_NAME --resource-group myResourceGroup --image UbuntuLTS
66+
export VM_NAME="my-virtual-machine"
67+
export RESOURCE_GROUP="my-resource-group"
68+
az vm create --name $VM_NAME --resource-group $RESOURCE_GROUP --image UbuntuLTS
6569
```
6670
```
6771

68-
**Example of unsupported command:**
69-
```markdown
70-
```sql
71-
SELECT * FROM myTable WHERE id = 1;
72-
```
73-
```
72+
**Example of unsupported SQL query (won't work):**
73+
```markdown
74+
```sql
75+
INSERT INTO myTable (name, value) VALUES ('test', 123);
76+
```
77+
```
78+
79+
**Example of supported SQL command (will work):**
80+
```markdown
81+
```bash
82+
export DATABASE_NAME="mydb"
83+
export TABLE_NAME="myTable"
84+
psql -d $DATABASE_NAME -c "INSERT INTO $TABLE_NAME (name, value) VALUES ('test', 123);"
85+
```
86+
```
7487

75-
>**Note:** The key principle is that if a code block can be executed in a BASH terminal as written (the way a human would execute it), then it will work with Exec Docs.
88+
>**Note:** The key principle is simple: if you can run it in a BASH terminal as written, it will work with Exec Docs (although at this time `sudo` is not supported). Code blocks in other languages won't be executed directly but can be included for human readers.
7689
7790
3. **Azure Portal Custom Cloud Shell Constraints**
7891
- **Supported scenarios:**

0 commit comments

Comments
 (0)