Multiple Line Paste #19582

Closed
opened 2026-01-31 06:47:56 +00:00 by claunia · 2 comments
Owner

Originally created by @mmanueljoao on GitHub (Mar 25, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621.0

Other Software

No response

Steps to reproduce

I'm getting mixed information about whether muliple line pasting is or is not available.

At this time, when trying to paste this example

# this is a comment 
if ($env:PublicIPv4 -ne (curl -s https://checkip.amazonaws.com/) ) {
	# this is another comment
    $env:PublicIPv4 = (curl -s https://checkip.amazonaws.com/) 
} 
# yet another comment

Windows Terminal pastes and executes the first line, then the executes the complete if block and then waits for me for the last line.

Should this be the default behavior ?

Expected Behavior

image

Actual Behavior

image

Originally created by @mmanueljoao on GitHub (Mar 25, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number 10.0.22621.0 ### Other Software _No response_ ### Steps to reproduce I'm getting mixed information about whether muliple line pasting is or is not available. At this time, when trying to paste this example ``` # this is a comment if ($env:PublicIPv4 -ne (curl -s https://checkip.amazonaws.com/) ) { # this is another comment $env:PublicIPv4 = (curl -s https://checkip.amazonaws.com/) } # yet another comment ``` Windows Terminal pastes and executes the first line, then the executes the complete _if block_ and then waits for me for the last line. Should this be the default behavior ? ### Expected Behavior ![image](https://user-images.githubusercontent.com/6817527/227743818-f4cc15af-4875-4cc1-8026-9cf03a9dbbeb.png) ### Actual Behavior ![image](https://user-images.githubusercontent.com/6817527/227743827-98720284-41d0-426f-9503-ffbfcba315d7.png)
claunia added the Needs-TriageIssue-BugResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 06:47:56 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Mar 27, 2023):

Thanks for the report! This is because PsReadline's Ctrl+V handler and Terminal's Ctrl+V handler operate a little differently. There have been a pile of discussions on this in the past. I think there was a more specific on, but I can't seem to find it. For reference, see:

I think ultimately, we decided to track this upstream in PsReadline, here:

/dup https://github.com/PowerShell/PSReadLine/issues/1471

If PowerShell is your primary shell, you can always unbind ctrl+v in the Terminal settings, which will let PsReadLine handle it.

@zadjii-msft commented on GitHub (Mar 27, 2023): Thanks for the report! This is because PsReadline's Ctrl+V handler and Terminal's Ctrl+V handler operate a little differently. There have been a pile of discussions on this in the past. I think there was a more specific on, but I can't seem to find it. For reference, see: * #11414 * #7794 * #13567 I think ultimately, we decided to track this upstream in PsReadline, here: /dup https://github.com/PowerShell/PSReadLine/issues/1471 If PowerShell is your primary shell, you can always unbind `ctrl+v` in the Terminal settings, which will let PsReadLine handle it.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 27, 2023):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 27, 2023): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. 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#19582