How do I get Windows Terminal to stop asking me every time I paste something into the terminal?

Everytime I paste something into Windows Terminal I get the following annoying message that's attempting to save me from myself.

I don't need it! How can I make it go away?

Dialog with the following message appearing in the middle of Windows Terminal after pasting which reads: Warning You are about to paste text that contains multiple lines...blah blah...


Solution 1:

From Microsoft's Windows Terminal docs about Terminal Interaction:

Paste warnings:

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

To change these settings:

Hold down the Shift key while selecting Settings in the Windows Terminal dropdown menu. This will open the editor associated with json files, typically Visual Studio Code if installed.

At the root of your settings.json (not under any other key, just inside the first level of brackets), add:

"multiLinePasteWarning": false,

Make sure to add a comma before or after, depending on where you place it.

For example:

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "multiLinePasteWarning": true,
    "actions": 
    [
    ...
}