Implement CTRL V "Safe Paste" from Windows PowerShell console #9440

Closed
opened 2026-01-31 01:54:32 +00:00 by claunia · 4 comments
Owner

Originally created by @yllekz on GitHub (Jul 4, 2020).

Description of the new feature/enhancement

Windows PowerShell in Windows 10 allows you to paste code using CTRL V without the lines immediately executing.
Windows Terminal doesn't appear to have this feature yet, as the only method of pasting content (unless it's PowerShell) is right clicking, and if you have multiple lines, the lines execute immediately.
I would love if the CTRL V "safe paste" feature from the Windows PowerShell console could be implemented.

Proposed technical implementation details (optional)

Press CTRL V; the contents are put into the line, but are not immediately executed.

The contents are put into the line, but are not immediately executed, especially if the paste queue is multi-line.

Originally created by @yllekz on GitHub (Jul 4, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Windows PowerShell in Windows 10 allows you to paste code using CTRL V without the lines immediately executing. Windows Terminal doesn't appear to have this feature yet, as the only method of pasting content (unless it's PowerShell) is right clicking, and if you have multiple lines, the lines execute immediately. I would love if the CTRL V "safe paste" feature from the Windows PowerShell console could be implemented. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) Press CTRL V; the contents are put into the line, but are not immediately executed. <!-- A clear and concise description of what you want to happen. --> The contents are put into the line, but are not immediately executed, especially if the paste queue is multi-line.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 01:54:32 +00:00
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jul 5, 2020):

Just remove the Ctrl+V binding from settings.json of Windows Terminal. Then, Windows Terminal will pass the Ctrl+V key combination to PSReadLine, and you will have your "safe paste" feature.

It might be better if Windows Terminal did not add the Ctrl+C and Ctrl+V bindings to settings.json in the first place.

@KalleOlaviNiemitalo commented on GitHub (Jul 5, 2020): Just remove the Ctrl+V binding from `settings.json` of Windows Terminal. Then, Windows Terminal will pass the Ctrl+V key combination to PSReadLine, and you will have your "safe paste" feature. It might be better if Windows Terminal did not add the Ctrl+C and Ctrl+V bindings to `settings.json` in the first place.
Author
Owner

@DHowett commented on GitHub (Jul 5, 2020):

might be better if

You and I agree on that point, but exactly 50% of our community will riot regardless of which paste option we make default (or which option we detect and pop up a dialog box about).

@DHowett commented on GitHub (Jul 5, 2020): > might be better if You and I agree on that point, but exactly 50% of our community will riot regardless of which paste option we make default (or which option we detect and pop up a dialog box about).
Author
Owner

@DHowett commented on GitHub (Jul 5, 2020):

@KalleOlaviNiemitalo is correct. Letting PSReadline handle this binding will work great if you only use powershell.
If you don’t, follow /dup #395.

@DHowett commented on GitHub (Jul 5, 2020): @KalleOlaviNiemitalo is correct. Letting PSReadline handle this binding will work great if you only use powershell. If you don’t, follow /dup #395.
Author
Owner

@ghost commented on GitHub (Jul 5, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jul 5, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9440