Pasting multiline text within the quotes does not work #18000

Open
opened 2026-01-31 06:00:53 +00:00 by claunia · 0 comments
Owner

Originally created by @AgentMC on GitHub (Jul 22, 2022).

Windows Terminal version

1.13.11431.0

Windows build number

Microsoft Windows [Version 10.0.19043.1826]

Other Software

Powershell 5/7

Steps to reproduce

  1. Open Terminal with Powershell 5 or 7
  2. type $x='' (ending with 2 single quotes)
  3. Move your cursor between the two single quotes
  4. Paste a multiline JSON, e.g.
[
  {
    "partition": 0,
    "offset": 1414225,
    "timestamp": 1641981208266
  }
]

Expected Behavior

The text is pasted between the quotes, that is, where the cursor is. Consequently, the trailing single quote is moved to the last line after the text being pasted. Consequently, the Powershell does not attempt to "execute" JSON.

This behavior is expected as the normal among every single OS and app out there, including consoles, such as CMD.

Actual Behavior

Text is pasted line by line. The first [ is indeed pasted between the quotes but the rest is pasted as a separate commands, which does not work.

Originally created by @AgentMC on GitHub (Jul 22, 2022). ### Windows Terminal version 1.13.11431.0 ### Windows build number Microsoft Windows [Version 10.0.19043.1826] ### Other Software Powershell 5/7 ### Steps to reproduce 1. Open Terminal with Powershell 5 or 7 2. type `$x=''` (ending with 2 single quotes) 3. Move your cursor between the two single quotes 4. Paste a multiline JSON, e.g. ``` [ { "partition": 0, "offset": 1414225, "timestamp": 1641981208266 } ] ``` ### Expected Behavior The text is pasted _between the quotes_, that is, where the cursor is. Consequently, the trailing single quote is moved to the last line after the text being pasted. Consequently, the Powershell does not attempt to "execute" JSON. This behavior is expected as the normal among every single OS and app out there, including consoles, such as CMD. ### Actual Behavior Text is pasted line by line. The first `[` is indeed pasted between the quotes but the rest is pasted as a separate commands, which does not work.
claunia added the Issue-BugResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 06:00:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18000