PSReadLineKeyHandler Function "Copy" does not work when used in WSL

Open
#5,187 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
csharp, powershell
Domain
cli

Research direction

Start by locating the PSReadLineKeyHandler implementation for the "Copy" function and the existing AsOSC52 handling used by Set-Clipboard. Verify the behavior in WSL and confirm that Copy uses the OSC 52 path when appropriate, with tests covering the resulting clipboard behavior.

Written by the indexing model from the issue text.

Description

Issue-Enhancement Needs-Triage :mag:
Prerequisites
  • Write a descriptive title.
Description of the new feature/enhancement

PSReadLineKeyHandler Function "Copy" does not work when used in WSL. This might be because by default it does not use AsOSC52 method. Similar to how 'test' | Set-Clipboard wont work but 'test' | Set-Clipboard -AsOSC52 does.

Proposed technical implementation details (optional)

Allow PSReadLineKeyHandler Function "Copy" to use AsOSC52

Dominant language
C#
Stars
4.4k
Forks
341
PR merge metrics
No merged PRs in 30d

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.

More from PowerShell/PSReadLine

All issues in PowerShell/PSReadLine

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.