PowerShell / PowerShell/vscode-powershell

PSReadLine Prompt not showing up after F8 in SSH Remoting

Open
#2,605 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I don't know if this is actually supported by the devs at this point, since the whole SSH-thing is still new on Windows. So I'm asking here. If it is valid for a bug report, please tell me the info you need, since it concerns VSCode, PowerShell 7 across 2 systems.

I enabled PSRemoting from my Windows to my Linux box. Since it has no GUI, I figured I should do an Enter-PSSession in the VSCode terminal, then develop my code from VSCode.

There is some unexpected behavior. First, a cosmetics issue. Tab completion on filesystem paths will always show a backslash instead of a forward slash. So I type /tm, press TAB and it turns into /tmp\. This does not happen if I first SSH to the Linux box and then start pwsh from its local shell. It is no problem, since it will automatically turn into a forward slash if I TAB-complete the next level.

More importantly, if I select a line in VSCode and press F8 to execute it, two things happen. First, if there is no output, the line will be copied to the terminal but not executed. I need to manually press Enter in the terminal window in order to actually execute the code. This also happens on the last line of a multi-line block and with both settings of the focusonexecute setting. Windows/Unix line feed differences?

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 issue in the VSCode terminal with Enter-PSSession from Windows to Linux, then test F8 with and without output and with both focusonexecute settings. Compare path completion and execution of the last line in a multi-line block, including the noted line-feed difference. Done means the prompt appears and F8 executes selected code without requiring a manual Enter.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.