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

All we need is an easy explanation of the problem, so here it is.

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?

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

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 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": 
    [
    ...
}

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply