The Computer Oracle

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

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Ancient Construction

--

Chapters
00:00 How Do I Get Windows Terminal To Stop Asking Me Every Time I Paste Something Into The Terminal?
00:19 Accepted Answer Score 62
01:36 Thank you

--

Full question
https://superuser.com/questions/1677982/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows #windows10 #powershell #windowsterminal

#avk47



ACCEPTED ANSWER

Score 62


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