Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions packages/app-web-docs/src/docs/user/languages/shellscript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/branch/branch.switchCase2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/branch/branch.switchCase3" languageId="shellscript" />

#### 5. Branch: Ternary

<i>A branch in a ternary expression</i>
Expand Down Expand Up @@ -111,12 +113,18 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair3" languageId="shellscript" />

#### 2. Key: Map pair (iteration)

<i>Iteration scope for keys of key-value pairs in a map: should be between the braces.</i>

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair.iteration" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair.iteration2" languageId="shellscript" />

### Comment

#### 1. Comment: Line
Expand Down Expand Up @@ -145,6 +153,10 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/condition/condition.switchCase" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/condition/condition.switchCase2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/condition/condition.switchCase3" languageId="shellscript" />

#### 4. Condition: Ternary

<i>A condition in a ternary expression</i>
Expand Down Expand Up @@ -215,6 +227,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/interior/interior.function2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/interior/interior.function3" languageId="shellscript" />

#### 4. Interior: If

<i>The body of an if/elif/else branch</i>
Expand All @@ -233,6 +247,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/interior/interior.switchCase" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/interior/interior.switchCase2" languageId="shellscript" />

#### 7. Interior: While

<i>The body of a while loop</i>
Expand All @@ -249,6 +265,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/list" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/list2" languageId="shellscript" />

### Map

#### 1. Map
Expand All @@ -257,6 +275,10 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/map" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/map2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/map3" languageId="shellscript" />

### Name

#### 1. Name: Assignment
Expand Down Expand Up @@ -319,6 +341,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/name/name.iteration.block4" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/name/name.iteration.block5" languageId="shellscript" />

#### 9. Name (iteration document)

<i>Iteration scope for names: the entire document including leading and trailing empty lines.</i>
Expand All @@ -337,6 +361,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/namedFunction/namedFunction3" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/namedFunction/namedFunction4" languageId="shellscript" />

#### 2. Named function (iteration document)

<i>Iteration scope for named functions: the entire document including leading and trailing empty lines.</i>
Expand Down Expand Up @@ -403,6 +429,10 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.function2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.function3" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.function4" languageId="shellscript" />

#### 9. Statement: Function call

<i>A function call statement</i>
Expand All @@ -411,6 +441,12 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.functionCall2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.functionCall3" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.functionCall4" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.functionCall5" languageId="shellscript" />

#### 10. Statement: If

<i>An if/elif/else statement</i>
Expand Down Expand Up @@ -479,6 +515,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.iteration.block4" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/statement/statement.iteration.block5" languageId="shellscript" />

#### 19. Statement (iteration document)

<i>Iteration scope for statements: the entire document including leading and trailing empty lines.</i>
Expand Down Expand Up @@ -511,12 +549,18 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.foreach" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.foreach2" languageId="shellscript" />

#### 5. Value: Map pair

<i>Value (RHS) of a key-value pair in a map</i>

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.mapPair" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.mapPair2" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.mapPair3" languageId="shellscript" />

#### 6. Value: Return

<i>Return value of a function</i>
Expand Down Expand Up @@ -551,6 +595,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.iteration.block4" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.iteration.block5" languageId="shellscript" />

#### 10. Value (iteration document)

<i>Iteration scope for values: the entire document including leading and trailing empty lines.</i>
Expand All @@ -563,6 +609,8 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.mapPair.iteration" languageId="shellscript" />

<ScopeVisualizer fixtureName="scopes/shellscript/value/value.mapPair.iteration2" languageId="shellscript" />

## Internal scopes

The following are internal scopes. They are not intended for user interaction or spoken use. These scopes exist solely for internal Cursorless functionality.
Expand Down
2 changes: 2 additions & 0 deletions packages/app-web-docs/src/docs/user/scopes/branch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ Default: `branch`

<ScopeVisualizer fixtureName="scopes/shellscript/branch/branch.switchCase2" />

<ScopeVisualizer fixtureName="scopes/shellscript/branch/branch.switchCase3" />

### Branch: Ternary

<i>A branch in a ternary expression</i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ Default: `key`

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair" />

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair2" />

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair3" />

##### Talon list

<ScopeVisualizer fixtureName="scopes/talon-list/key.mapPair" />
Expand Down Expand Up @@ -189,6 +193,8 @@ Default: `key`

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair.iteration" />

<ScopeVisualizer fixtureName="scopes/shellscript/key.mapPair.iteration2" />

##### Talon list

<ScopeVisualizer fixtureName="scopes/talon-list/key.mapPair.iteration" />
Expand Down
4 changes: 4 additions & 0 deletions packages/app-web-docs/src/docs/user/scopes/condition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ Default: `condition`

<ScopeVisualizer fixtureName="scopes/shellscript/condition/condition.switchCase" />

<ScopeVisualizer fixtureName="scopes/shellscript/condition/condition.switchCase2" />

<ScopeVisualizer fixtureName="scopes/shellscript/condition/condition.switchCase3" />

### Condition: Ternary

<i>A condition in a ternary expression</i>
Expand Down
35 changes: 35 additions & 0 deletions packages/app-web-docs/src/docs/user/scopes/fixtures/branch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3318,6 +3318,41 @@
}
]
},
{
"name": "scopes/shellscript/branch/branch.switchCase3",
"languageId": "shellscript",
"facet": "branch.switchCase",
"code": "case $foo in\n 0) : ;&\n 1) : ;;&\n *) : ;;\nesac",
"scopes": [
{
"targets": [
{
"content": "1:2-1:9",
"removal": "1:0-2:0"
}
],
"domain": "1:2-1:9"
},
{
"targets": [
{
"content": "2:2-2:10",
"removal": "2:0-3:0"
}
],
"domain": "2:2-2:10"
},
{
"targets": [
{
"content": "3:2-3:9",
"removal": "3:0-4:0"
}
],
"domain": "3:2-3:9"
}
]
},
{
"name": "scopes/shellscript/branch/branch.ternary.iteration",
"languageId": "shellscript",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,22 @@
}
]
},
{
"name": "scopes/shellscript/key.mapPair.iteration2",
"languageId": "shellscript",
"facet": "key.mapPair.iteration",
"code": "foo=(\"aaa\"$bar bbb)\nbar=([\"aaa\"] bbb)\nbaz=(\"[aaa]=0\" bbb)\nbongo=([\"aaa\"]=0)",
"scopes": [
{
"targets": [
{
"content": "3:7-3:16"
}
],
"domain": "3:7-3:16"
}
]
},
{
"name": "scopes/shellscript/key.mapPair",
"languageId": "shellscript",
Expand All @@ -713,6 +729,40 @@
}
]
},
{
"name": "scopes/shellscript/key.mapPair2",
"languageId": "shellscript",
"facet": "key.mapPair",
"code": "foo=(\"aaa\"$bar bbb)\nbar=([\"aaa\"] bbb)\nbaz=(\"[aaa]=0\" bbb)\nbongo=([\"aaa\"]=0)",
"scopes": [
{
"targets": [
{
"content": "3:8-3:13",
"removal": "3:8-3:13"
}
],
"domain": "3:7-3:16"
}
]
},
{
"name": "scopes/shellscript/key.mapPair3",
"languageId": "shellscript",
"facet": "key.mapPair",
"code": "foo=([\"aaa\"]=\"bbb\"$bar)",
"scopes": [
{
"targets": [
{
"content": "0:6-0:11",
"removal": "0:6-0:11"
}
],
"domain": "0:5-0:22"
}
]
},
{
"name": "scopes/talon/key/key.mapPair.iteration",
"languageId": "talon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,58 @@
}
]
},
{
"name": "scopes/shellscript/condition/condition.switchCase2",
"languageId": "shellscript",
"facet": "condition.switchCase",
"code": "case $foo in\n 0|1|2) : ;;\nesac",
"scopes": [
{
"targets": [
{
"content": "1:2-1:7",
"removal": "1:0-1:7"
}
],
"domain": "1:2-1:13"
}
]
},
{
"name": "scopes/shellscript/condition/condition.switchCase3",
"languageId": "shellscript",
"facet": "condition.switchCase",
"code": "case $foo in\n 0) : ;&\n 1) : ;;&\n *) : ;;\nesac",
"scopes": [
{
"targets": [
{
"content": "1:2-1:3",
"removal": "1:0-1:3"
}
],
"domain": "1:2-1:9"
},
{
"targets": [
{
"content": "2:2-2:3",
"removal": "2:0-2:3"
}
],
"domain": "2:2-2:10"
},
{
"targets": [
{
"content": "3:2-3:3",
"removal": "3:0-3:3"
}
],
"domain": "3:2-3:9"
}
]
},
{
"name": "scopes/shellscript/condition/condition.ternary",
"languageId": "shellscript",
Expand Down
Loading
Loading