-
-
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
Nov 27, 2023
1 parent
41cf78d
commit 307d7ea
Showing
31 changed files
with
931 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} |
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} |
29 changes: 29 additions & 0 deletions
29
...ursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeFunkName.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 funk name | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: functionName} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
function foo() { | ||
echo "foo" | ||
} | ||
selections: | ||
- anchor: {line: 1, character: 5} | ||
active: {line: 1, character: 5} | ||
marks: {} | ||
finalState: | ||
documentContents: |- | ||
function () { | ||
echo "foo" | ||
} | ||
selections: | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} |
28 changes: 28 additions & 0 deletions
28
...cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeIfState.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,28 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change if state | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: ifStatement} | ||
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: 8} | ||
active: {line: 3, character: 8} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
22 changes: 22 additions & 0 deletions
22
.../cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/shellscript/changeInside.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,22 @@ | ||
languageId: shellscript | ||
command: | ||
version: 6 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: var="fo(o)" | ||
selections: | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} | ||
marks: {} | ||
finalState: | ||
documentContents: var="fo()" | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 8} |
Oops, something went wrong.