[PR #17994] Don't send newlines to the shell from Terminal Chat #31418

Open
opened 2026-01-31 09:47:10 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/17994

State: closed
Merged: Yes


Summary of the Pull Request

When a multiline code block is clicked in Terminal chat, the first command gets run before the user presses 'Enter'. This commit fixes that by separating the code lines by the delimiter appropriate to the shell (& for cmd, ; for everything else).

Validation Steps Performed

Newlines get replaced with the appropriate delimiter

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/17994 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request When a multiline code block is clicked in Terminal chat, the first command gets run before the user presses 'Enter'. This commit fixes that by separating the code lines by the delimiter appropriate to the shell (`&` for cmd, `;` for everything else). ## Validation Steps Performed Newlines get replaced with the appropriate delimiter ## PR Checklist - [x] Closes #17939 - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:47:10 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31418