Change:
default: false }, [TerminalSettingId.EnableMultiLinePasteWarning]: { <del> markdownDescription: localize('terminal.integrated.enableMultiLinePasteWarning', "Show a warning dialog when pasting multiple lines into the terminal. The dialog does not show when:nn- Bracketed paste mode is enabled (the shell supports multi-line paste natively)n- The paste is handled by the shell's readline (in the case of pwsh)"), type: 'boolean', default: true </del> <ins> markdownDescription: localize('terminal.integrated.enableMultiLinePasteWarning', "Controls whether to show a warning dialog when pasting multiple lines into the terminal."), type: 'string', enum: ['auto', 'always', 'never'], markdownEnumDescriptions: [ localize('terminal.integrated.enableMultiLinePasteWarning.auto', "Enable the warning but do not show it when:nn- Bracketed paste mode is enabled (the shell supports multi-line paste natively)n- The paste is handled by the shell's readline (in the case of pwsh)"), localize('terminal.integrated.enableMultiLinePasteWarning.always', "Always show the warning if the text contains a new line."), localize('terminal.integrated.enableMultiLinePasteWarning.never', "Never show the warning.") ], default: 'auto' </ins> }, [TerminalSettingId.DrawBoldTextInBrightColors]: { description: localize('terminal.integrated.drawBoldTextInBrightColors', "Controls whether bold text in the terminal will always use the "bright" ANSI color variant."),

Discussion:
Type: <bBug</bSince i newly installed vs code version 1.84.2 I have an issue where, every time i paste a command into the termnal it executes immediately without my having pressed enter. So far I have read that this "feature" was removed from VS code but apparently it persists. VS Code version: Code 1.84.2 (, 2023-11-09T10:51:52.184Z) OS version: WindowsNT x64 10.0. Modes: Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2 <details<summarySystem Info</summary </details<details<summaryExtensions (7)</summaryExtensionVersion ------ remote-ssh0.107.1 remote-ssh-edit0.86.0 remote-wsl0.81.8 vscode-remote-extensionpack0.25.0 material-icon-theme4.32.0 ayu1.0.5 material-theme3.16.2 (1 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Thanks for creating this issue! To help narrow it down, please take the time to follow below steps. Thanks a lot and happy coding Stop VS Code and from the command line (NOT the integrated terminal in Code), execute: and try your steps again to see if it reproduces. If it still reproduces, jump to the next chapter. If you see it is an issue with the extension, please run the command and follow the instructions to find the extension that is causing this issue. <img width="631" alt="image" src="https://user-"Please report the issue to the extension causing this. If the issue is not caused by an extension, it is maybe caused by your configuration. Try to run where is an empty folder. This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running. If it still reproduces, it was maybe fixed already in our nightly release. Please download from and see if you can reproduce the issue. Finally, to help us narrow down what change caused the issue, please run the following command to find the build.

It will start previous releases of VS Code insiders to see where the regression was introduced: follow the instructions until you found the offending build report back the commit range in this issue Thanks! /label info-needed
Hi, I think I've observed that the newline is automatically entered only when the pasted text was copied from a "copy button" on a website. It seems that when I click and drag-select text that there is no problem. which would indicate that the automatic newline is perhaps an artifact of the copy button feature on some websites, and is carried through the clipboard.
this sounds like it's working as designed. reopen if I'm misunderstanding.
Yes this is by design, we do have a warning alert that pops up when pasting which is enabled by default , but this is ignored if the shell has enabled bracketed paste mode. Some shells like pwsh uses bracketed paste mode to ensure it's all treated as a single input, as if shift+enter was being used instead of enter.
I am using bash shell wsl Ubuntu. I get no warnings, just immediate execution. Seems like something that should not be turned on by default
I actually rely on this behavior almost every day, we also have an explicit check here that bypasses the warning even when bracketed paste mode is off when it's followed by a single new line: I get your point that some might not like the behavior. Since we already have , instead of just we could expand it to be something like where is the current "smart" default and "always" ignores the single new line and bracketed paste mode checks.
I'm thinking we may not actually be talking about the same issue. My issue is that, when I copy code from any website that features a "copy" button, and then paste that code into my terminal, the command is executed immediately, not just put on a new line
would the new warning when is used better for you? It would still execute immediately after you say ok, but at least you'll know that your text has a copied line
auto does not seem to work for me with pwsh: ! Powershell recognizes the multi line input (see ), but I still get the warning when configuring "auto"
For pwsh the multi-line paste warning should never be getting hit since there is a custom keybinding which sends it to PSReadLine to be handled by that.

That's this built-in keybinding: This is called out here: ! If that is disabled I don't think pwsh turns on bracketed paste mode so that would be working as intended. can you check why that keybinding is not being used? You might have unbound it? Since this was a feature request done for Dec/Jan I'll close this. Please open a new bug if there is indeed a new problem.
I just verified this on my laptop, there it works as expected!