-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for local snippets in the CWD (#17388)
This PR adds the ability to load snippets from the CWD into the suggestions UI. If shell integration is disabled, then we only ever think the CWD for a pane is it's `startingDirectory`. So, in the default case, users can still stick snippets into the root of their git repos, and have the Terminal load them automatically (for profiles starting in the root of their repo). If it's enabled though, we'll always try to load snippets from the CWD of the shell. * We cache the actions into a separate map of CWD -> actions. This lets us read the file only the first time we see a dir. * We clear that cache on settings reload * We only load `sendInput` actions from the `.wt.json` As spec'd in #17329
- Loading branch information
1 parent
7851c96
commit 21fa303
Showing
16 changed files
with
253 additions
and
80 deletions.
There are no files selected for viewing
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 @@ | ||
{ | ||
"$version": "1.0.0", | ||
"snippets": | ||
[ | ||
{ | ||
"input": "bx\r", | ||
"name": "Build project", | ||
"description": "Build the project in the CWD" | ||
}, | ||
{ | ||
"input": "bz\r", | ||
"name": "Build solution, incremental", | ||
"description": "Just build changes to the solution" | ||
}, | ||
{ | ||
"input": "bcz\r", | ||
"name": "Clean & build solution", | ||
"icon": "\uE8e6", | ||
"description": "Start over. Go get your coffee. " | ||
}, | ||
{ | ||
"input": "nuget push -ApiKey az -source TerminalDependencies %userprofile%\\Downloads", | ||
"name": "Upload package to nuget feed", | ||
"icon": "\uE898", | ||
"description": "Go download a .nupkg, put it in ~/Downloads, and use this to push to our private feed." | ||
} | ||
] | ||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.