Skip to content

Commit 7c1ad00

Browse files
committed
Provide Run Selection button in Editor Title Menu
This commit adds a editor title menu button for the `powershell.RunSelection` command in the primary navigation group, and the `run` icon from the https://github.com/microsoft/vscode-icons repo. This shows the button in the visible part of the menu when a PowerShell file is open.
1 parent 661a9ee commit 7c1ad00

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

package.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@
164164
{
165165
"command": "PowerShell.RunSelection",
166166
"title": "Run Selection",
167-
"category": "PowerShell"
167+
"category": "PowerShell",
168+
"icon": {
169+
"light": "resources/light/run.svg",
170+
"dark": "resources/dark/run.svg"
171+
}
168172
},
169173
{
170174
"command": "PowerShell.RestartSession",
@@ -260,6 +264,13 @@
260264
"group": "2_powershell"
261265
}
262266
],
267+
"editor/title": [
268+
{
269+
"when": "resourceLangId == powershell",
270+
"command": "PowerShell.RunSelection",
271+
"group": "navigation@100"
272+
}
273+
],
263274
"editor/title/context": [
264275
{
265276
"when": "resourceFilename =~ /\\.tests\\.ps1$/i",

resources/dark/run.svg

+3
Loading

resources/light/run.svg

+3
Loading

0 commit comments

Comments
 (0)