vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Feature Request: Ability to run highlighted code via right-click?

Open cobdev opened this issue 9 years ago • 6 comments

System Details

  • Operating system name and version: Windows 10 Enterprise v1607
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.10.1
  • Output from $PSVersionTable: PSVersion 5.1.15061.0 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.15061.0 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Request Description

In addition to hitting F8 to run the currently highlighted code, could we have the ability to right-click and select an option to run the code as well? Similar to PowerShell ISE's option? (See Attached)

2017_03_17_14_27_27_greenshot

cobdev avatar Mar 17 '17 21:03 cobdev

Yep, I can add that.

daviwil avatar Mar 17 '17 21:03 daviwil

Thank you sir! :)

cobdev avatar Mar 17 '17 21:03 cobdev

+1 to this, and any chance we could get a couple buttons added to the PowerShell terminal window as well, similar to the ISE? One for run script and one for run selection?

jboeshart avatar Mar 23 '17 18:03 jboeshart

Unfortunately I can't manipulate the terminal window UI so adding new buttons won't be likely. I'll add the context menu items for the next release, though.

daviwil avatar Mar 23 '17 18:03 daviwil

No prob, worth an ask. Having the context menu items will be great though. Thanks for the work on this!

jboeshart avatar Mar 24 '17 01:03 jboeshart

Adding a screenshot for the changelog:

image

daviwil avatar Apr 04 '17 17:04 daviwil