Setting to disable "Paste multiline text may execute code" popup message introduced in WT 1.2 Preview #9835

Closed
opened 2026-01-31 02:05:06 +00:00 by claunia · 12 comments
Owner

Originally created by @ChrisLynchHPE on GitHub (Jul 24, 2020).

Description of the new feature/enhancement

In the newly released Windows Terminal 1.2.2022.0 Preview, pasting multiple lines of text produces a new dialog message:

image

There is no documented setting to disable this prompt (likely not implemented at all). Please implement a settings option to never prompt this message again. As a developer and power user, this message is pointless to me. This breaks my flow of development, as this message is displayed every time I paste multiple lines of code into the terminal, regardless of the tab, and I have to click Paste anyway button. The average user might find this new setting helpful too.

Proposed technical implementation details (optional)

Similar to the confirmCloseAllTabs setting property, a similar one for this should be created:

Property name: confirmMultiLinePasteMessage
Necessity: Optional
Accepts: true, false
Default value: true
``
Originally created by @ChrisLynchHPE on GitHub (Jul 24, 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 In the newly released Windows Terminal 1.2.2022.0 Preview, pasting multiple lines of text produces a new dialog message: ![image](https://user-images.githubusercontent.com/6956305/88414668-15a0cb00-cd92-11ea-936c-b71e6c459343.png) There is no documented setting to disable this prompt (likely not implemented at all). Please implement a settings option to never prompt this message again. As a developer and power user, this message is pointless to me. This breaks my flow of development, as this message is displayed every time I paste multiple lines of code into the terminal, regardless of the tab, and I have to click `Paste anyway` button. The average user might find this new setting helpful too. # Proposed technical implementation details (optional) Similar to the `confirmCloseAllTabs` setting property, a similar one for this should be created: ``` Property name: confirmMultiLinePasteMessage Necessity: Optional Accepts: true, false Default value: true ``
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 02:05:06 +00:00
Author
Owner

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

You mean like this one?

@DHowett commented on GitHub (Jul 24, 2020): You mean like [this one](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/global-settings#warn-when-the-text-to-paste-contains-multiple-lines-preview)?
Author
Owner

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

likely not implemented at all

ye of little faith ☹️

@DHowett commented on GitHub (Jul 24, 2020): > likely not implemented at all ye of little faith ☹️
Author
Owner

@ChrisLynchHPE commented on GitHub (Jul 24, 2020):

Well, when I searched the docs (looking for CTRL+F either pop or popup), I didn't find it. So thank you for pointing it out.

@ChrisLynchHPE commented on GitHub (Jul 24, 2020): Well, when I searched the docs (looking for CTRL+F either `pop` or `popup`), I didn't find it. So thank you for pointing it out.
Author
Owner

@ChrisLynchHPE commented on GitHub (Jul 24, 2020):

Also, this isn't in the settings schema. So if editing in VSCode, neither largePasteWarning or multiLinePasteWarning appear in Intellisense results. Which I see the default schema points to 1.1 support, which makes sense. Maybe there should be a preview schema for preview releases?

@ChrisLynchHPE commented on GitHub (Jul 24, 2020): Also, this isn't in the settings schema. So if editing in VSCode, neither `largePasteWarning` or `multiLinePasteWarning` appear in Intellisense results. Which I see the default schema points to 1.1 support, which makes sense. Maybe there should be a preview schema for preview releases?
Author
Owner

@aybiss commented on GitHub (Sep 3, 2020):

This is really really terrible. And when are we going to get a settings editor better than Notepad?

@aybiss commented on GitHub (Sep 3, 2020): This is really really terrible. And when are we going to get a settings editor better than Notepad?
Author
Owner

@aybiss commented on GitHub (Sep 3, 2020):

Even if the settings files contained all the settings so we could look through them it would be better than just stabbing in the dark. Do you know how many possible settings there are with 26 letters, lower and upper case, the length of multiLinePasteWarning?

1.0866013e+36.

That's how many settings you want people to try out in order to find something.

:-P

@aybiss commented on GitHub (Sep 3, 2020): Even if the settings files contained all the settings so we could look through them it would be better than just stabbing in the dark. Do you know how many possible settings there are with 26 letters, lower and upper case, the length of multiLinePasteWarning? 1.0866013e+36. That's how many settings you want people to try out in order to find something. :-P
Author
Owner

@DHowett commented on GitHub (Sep 3, 2020):

I don't know -- the editor I have configured to edit JSON files (which is very much not Notepad) is significantly more helpful than would force me to try options at random 😉

image

@DHowett commented on GitHub (Sep 3, 2020): I don't know -- the editor I have configured to edit JSON files (which is very much not Notepad) is significantly more helpful than would force me to try options at random 😉 ![image](https://user-images.githubusercontent.com/189190/92059194-76360700-ed45-11ea-9b5d-ee31e9e518c0.png)
Author
Owner

@aybiss commented on GitHub (Sep 8, 2020):

Ahhh, you must have access to the internet while you're editing those files. Would be good if all the settings were there in the file.

@aybiss commented on GitHub (Sep 8, 2020): Ahhh, you must have access to the internet while you're editing those files. Would be good if all the settings were there in the file.
Author
Owner

@sudomyju commented on GitHub (Feb 28, 2021):

@DHowett .... sorry that link of yours -> You mean like this one? kind of doesn't aim to anything meaningful regarding this issue.

Is that a problem for you to add the exact json attribute what should go in the jsonsettings in order to disable the multiple lines paste warning?

As like pointing to a page (which obviously updates not regarding to your post) and being obscure about what settings attributes should go in is not helpful at all.

Can you perhaps add a plaintext json attribute that fixes this?

perhaps it is already fixed half year later ?

@sudomyju commented on GitHub (Feb 28, 2021): @DHowett .... sorry that link of yours -> ```You mean like this one?``` kind of doesn't aim to anything meaningful regarding this issue. Is that a problem for you to add the exact json attribute what should go in the jsonsettings in order to disable the multiple lines paste warning? As like pointing to a page (which obviously updates not regarding to your post) and being obscure about what settings attributes should go in is not helpful at all. Can you perhaps add a plaintext json attribute that fixes this? perhaps it is already fixed half year later ?
Author
Owner

@zadjii-msft commented on GitHub (Mar 1, 2021):

@sudomyju Sorry about that, our docs site got updated in the last 7 months since that post. Some of the URLs must not forward as expected. The new link is here:

https://docs.microsoft.com/en-us/windows/terminal/customize-settings/interaction#warn-when-the-text-to-paste-contains-multiple-lines

Warn when the text to paste contains multiple lines

When this is set to true, trying to paste text with multiple lines will display a dialog asking you whether to continue or not with the paste. When it's set to false, the dialog is not shown and instead the text is pasted right away. In most shells, one line corresponds to one command so if you paste text that contains the "new line" character into a shell, one or more command(s) might be executed automatically upon paste, without you having time to validate the commands. This can be useful if you often copy and paste commands from untrusted websites.

Property name: multiLinePasteWarning

Necessity: Optional

Accepts: true, false

Default value: true

@zadjii-msft commented on GitHub (Mar 1, 2021): @sudomyju Sorry about that, our docs site got updated in the last 7 months since that post. Some of the URLs must not forward as expected. The new link is here: https://docs.microsoft.com/en-us/windows/terminal/customize-settings/interaction#warn-when-the-text-to-paste-contains-multiple-lines > ### Warn when the text to paste contains multiple lines > > When this is set to `true`, trying to paste text with multiple lines will display a dialog asking you whether to continue or not with the paste. When it's set to `false`, the dialog is not shown and instead the text is pasted right away. In most shells, one line corresponds to one command so if you paste text that contains the "new line" character into a shell, one or more command(s) might be executed automatically upon paste, without you having time to validate the commands. This can be useful if you often copy and paste commands from untrusted websites. > > **Property name:** `multiLinePasteWarning` > > **Necessity:** Optional > > **Accepts:** `true`, `false` > > **Default value:** `true`
Author
Owner

@sudomyju commented on GitHub (Mar 4, 2021):

Thank you Mike @zadjii-msft
great post btw 👍 :-)

@sudomyju commented on GitHub (Mar 4, 2021): Thank you Mike @zadjii-msft great post btw 👍 :-)
Author
Owner

@crackwitz commented on GitHub (Jun 30, 2024):

Now if only that property were presented in the settings UI. At this time, it does not appear to be.

@crackwitz commented on GitHub (Jun 30, 2024): Now if only that property were presented in the settings UI. At this time, it does not appear to be.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9835