PowerShell / PowerShell/vscode-powershell

F8 should Support Here String

Open
#3,242 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Extension Terminal Issue-Enhancement
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

I have a PowerShell code snippet like below.

Write-Output @"
Hello
World
"@
Current Behavior

I put the cursor at the end of the first line. Press F8 (PowerShell.RunSelection). This is what I see in the integration console.
image

Expected Behavior

The PowerShell extension should recognize the here string and run all lines when F8 is pressed.
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the PowerShell.RunSelection behavior with the here-string snippet and inspect the selection handling used by the integration console. Done means pressing F8 with the cursor at the end of the first line runs all here-string lines and produces the expected console output.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.