Add support for automatic replies ala VsCode #16632

Closed
opened 2026-01-31 05:17:55 +00:00 by claunia · 3 comments
Owner

Originally created by @zadjii-msft on GitHub (Feb 4, 2022).

https://code.visualstudio.com/updates/v1_64#_automatic-replies

Something like their syntax:

"terminal.integrated.autoReplies": {
  "[Oh My Zsh] Would you like to check for updates? [Y/n]": "Y\r",
  "Terminate batch job (Y/N)": null
}

Might even be able to close out #217 with this 👀

There'd be obvious edge cases where a string is split over many writes, but that might be acceptable.

The perf hit would be the thing I'd be most worried about. We'd need to have a very clever way of not impacting throughput too much.

Originally created by @zadjii-msft on GitHub (Feb 4, 2022). https://code.visualstudio.com/updates/v1_64#_automatic-replies Something like their syntax: ```jsonc "terminal.integrated.autoReplies": { "[Oh My Zsh] Would you like to check for updates? [Y/n]": "Y\r", "Terminate batch job (Y/N)": null } ``` Might even be able to close out #217 with this 👀 There'd be obvious edge cases where a string is split over many writes, but that might be acceptable. The perf hit would be the thing I'd be most worried about. We'd need to have a very clever way of not impacting throughput too much.
claunia added the Issue-FeatureArea-SettingsResolution-DuplicateProduct-Terminal labels 2026-01-31 05:17:55 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Mar 21, 2022):

brain blast: it's gotta accept capture groups and the ability to reference them in the reply.

Consider:

fatal: The current branch dev/migrie/fhl/menu-complete-prototype has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin dev/migrie/fhl/menu-complete-prototype

match on

"autoReplies": {
    "    git push --set-upstream origin (.*)": "git push --set-upstream origin ${match[0]}"
}

to automatically output

git push --set-upstream origin dev/migrie/fhl/menu-complete-prototype

<pseudo-spec>

@zadjii-msft commented on GitHub (Mar 21, 2022): brain blast: it's gotta accept capture groups and the ability to reference them in the reply. Consider: ``` fatal: The current branch dev/migrie/fhl/menu-complete-prototype has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin dev/migrie/fhl/menu-complete-prototype ``` match on ```json "autoReplies": { " git push --set-upstream origin (.*)": "git push --set-upstream origin ${match[0]}" } ``` to automatically output `git push --set-upstream origin dev/migrie/fhl/menu-complete-prototype` \<pseudo-spec>
Author
Owner

@zadjii-msft commented on GitHub (Sep 9, 2022):

I'm just tracking this in /dup #5916 at this point.

@zadjii-msft commented on GitHub (Sep 9, 2022): I'm just tracking this in /dup #5916 at this point.
Author
Owner

@ghost commented on GitHub (Sep 9, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Sep 9, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16632