Skip to content

Commit 5905089

Browse files
committed
Provide Run button in Editor Title Menu
This commit adds a editor title menu button for the `powershell.Run` command which maps to the builtin VS Code Debug start command. It places it in the primary navigation group, and the uses `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 0b34843 commit 5905089

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

package.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@
161161
},
162162
"category": "PowerShell"
163163
},
164+
{
165+
"command": "workbench.action.debug.start",
166+
"title": "Run",
167+
"category": "PowerShell",
168+
"icon": {
169+
"light": "resources/light/run.svg",
170+
"dark": "resources/dark/run.svg"
171+
}
172+
},
164173
{
165174
"command": "PowerShell.RunSelection",
166175
"title": "Run Selection",
@@ -267,8 +276,13 @@
267276
"editor/title": [
268277
{
269278
"when": "resourceLangId == powershell",
270-
"command": "PowerShell.RunSelection",
279+
"command": "workbench.action.debug.start",
271280
"group": "navigation@100"
281+
},
282+
{
283+
"when": "resourceLangId == powershell",
284+
"command": "PowerShell.RunSelection",
285+
"group": "navigation@101"
272286
}
273287
],
274288
"editor/title/context": [

resources/dark/run.svg

Lines changed: 3 additions & 0 deletions
Loading

resources/light/run.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)