-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial next gen scope support for shellscript
- Loading branch information
fidgetingbits
committed
Dec 27, 2023
1 parent
7341d0f
commit f235bda
Showing
35 changed files
with
1,062 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ges/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeArg.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change arg | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: argumentOrParameter} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: var="foo ${bar}" | ||
selections: | ||
- anchor: {line: 0, character: 13} | ||
active: {line: 0, character: 13} | ||
marks: {} | ||
finalState: | ||
documentContents: var="foo " | ||
selections: | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} |
23 changes: 23 additions & 0 deletions
23
...es/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeArg2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change arg | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: argumentOrParameter} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: var="foo $bar" | ||
selections: | ||
- anchor: {line: 0, character: 10} | ||
active: {line: 0, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: var="foo " | ||
selections: | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} |
23 changes: 23 additions & 0 deletions
23
...es/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeArg3.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change arg | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: argumentOrParameter} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: echo "foo" | ||
selections: | ||
- anchor: {line: 0, character: 6} | ||
active: {line: 0, character: 6} | ||
marks: {} | ||
finalState: | ||
documentContents: "echo " | ||
selections: | ||
- anchor: {line: 0, character: 5} | ||
active: {line: 0, character: 5} |
23 changes: 23 additions & 0 deletions
23
...es/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeArg4.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change arg | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: argumentOrParameter} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: echo "foo" "bar" | ||
selections: | ||
- anchor: {line: 0, character: 15} | ||
active: {line: 0, character: 15} | ||
marks: {} | ||
finalState: | ||
documentContents: "echo \"foo\" " | ||
selections: | ||
- anchor: {line: 0, character: 11} | ||
active: {line: 0, character: 11} |
31 changes: 31 additions & 0 deletions
31
.../cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeBranch.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change branch | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: branch} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
if [ "$number" -eq 42 ]; then | ||
echo "The number is 42" | ||
else | ||
echo "The number is not 42" | ||
fi | ||
selections: | ||
- anchor: {line: 3, character: 10} | ||
active: {line: 3, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: |- | ||
if [ "$number" -eq 42 ]; then | ||
echo "The number is 42" | ||
fi | ||
selections: | ||
- anchor: {line: 2, character: 0} | ||
active: {line: 2, character: 0} |
35 changes: 35 additions & 0 deletions
35
...cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeBranch2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change branch | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: branch} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
if [ "$number" -eq 42 ]; then | ||
echo "The number is 42" | ||
elif [ "$number" -gt 42 ]; then | ||
echo "The number is greater than 42" | ||
else | ||
echo "The number is less than than 42" | ||
fi | ||
selections: | ||
- anchor: {line: 3, character: 10} | ||
active: {line: 3, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: |- | ||
if [ "$number" -eq 42 ]; then | ||
echo "The number is 42" | ||
else | ||
echo "The number is less than than 42" | ||
fi | ||
selections: | ||
- anchor: {line: 2, character: 0} | ||
active: {line: 2, character: 0} |
23 changes: 23 additions & 0 deletions
23
...es/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeCall.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change call | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: functionCall} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: echo "foo" | ||
selections: | ||
- anchor: {line: 0, character: 10} | ||
active: {line: 0, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
23 changes: 23 additions & 0 deletions
23
.../cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeCallee.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change callee | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: functionCallee} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: echo "foo" | ||
selections: | ||
- anchor: {line: 0, character: 10} | ||
active: {line: 0, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: " \"foo\"" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
23 changes: 23 additions & 0 deletions
23
...cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeComment.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change comment | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: comment} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: "# foo" | ||
selections: | ||
- anchor: {line: 0, character: 5} | ||
active: {line: 0, character: 5} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
33 changes: 33 additions & 0 deletions
33
...rsorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeCondition.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change condition | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: condition} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
if [ "$number" -eq 42 ]; then | ||
echo "The number is 42" | ||
else | ||
echo "The number is not 42" | ||
fi | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 8} | ||
marks: {} | ||
finalState: | ||
documentContents: |- | ||
if ; then | ||
echo "The number is 42" | ||
else | ||
echo "The number is not 42" | ||
fi | ||
selections: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 3} |
39 changes: 39 additions & 0 deletions
39
...sorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeCondition2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change condition | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: condition} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: | | ||
if [["$number" -eq 42 ]]; then | ||
echo "number match" | ||
elif [[ $number -lt 20 ]]; then | ||
echo "< 20" | ||
else | ||
echo "No match" | ||
fi | ||
selections: | ||
- anchor: {line: 4, character: 6} | ||
active: {line: 4, character: 6} | ||
marks: {} | ||
finalState: | ||
documentContents: | | ||
if [["$number" -eq 42 ]]; then | ||
echo "number match" | ||
elif ; then | ||
echo "< 20" | ||
else | ||
echo "No match" | ||
fi | ||
selections: | ||
- anchor: {line: 3, character: 5} | ||
active: {line: 3, character: 5} |
27 changes: 27 additions & 0 deletions
27
...ursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeEveryArg.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change every arg | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: everyScope | ||
scopeType: {type: argumentOrParameter} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: echo a b c | ||
selections: | ||
- anchor: {line: 0, character: 10} | ||
active: {line: 0, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: "echo " | ||
selections: | ||
- anchor: {line: 0, character: 5} | ||
active: {line: 0, character: 5} | ||
- anchor: {line: 0, character: 6} | ||
active: {line: 0, character: 6} | ||
- anchor: {line: 0, character: 7} | ||
active: {line: 0, character: 7} |
29 changes: 29 additions & 0 deletions
29
...rsorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeEveryItem.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change every item | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: everyScope | ||
scopeType: {type: collectionItem} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: | | ||
array=("apple" "banana" "cherry") | ||
selections: | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} | ||
marks: {} | ||
finalState: | ||
documentContents: | | ||
array=( ) | ||
selections: | ||
- anchor: {line: 0, character: 7} | ||
active: {line: 0, character: 7} | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 8} | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} |
26 changes: 26 additions & 0 deletions
26
...es/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeFunk.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change funk | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: namedFunction} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
function foo() { | ||
echo "foo" | ||
} | ||
selections: | ||
- anchor: {line: 0, character: 7} | ||
active: {line: 0, character: 7} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
Oops, something went wrong.