Paste with promptable sections (powered by AI) #19628

Open
opened 2026-01-31 06:49:10 +00:00 by claunia · 5 comments
Owner

Originally created by @jaigak on GitHub (Apr 4, 2023).

Description of the new feature/enhancement

Often times, you copy commands from a website that has placeholders in it, which you are supposed to replace. Currently, on almost all terminals, you either copy the entire thing, move the cursor to where the placeholder is there and overwrite it. Or if you are like me, you copy it into Notepad, replace the placeholder with your parameter and then paste it into the terminal. Both are not very convenient.

Proposed technical implementation details (optional)

Not exactly sure how the syntax should look to distinguish placeholders from actual text, but Windows Terminal could decide one. When a string with placeholders is copied, Windows Terminal should allow you to press Tab and to simply overwrite each placeholder with a parameter you want. The way Visual Studio does small code snippets could be an inspiration.

Originally created by @jaigak on GitHub (Apr 4, 2023). # Description of the new feature/enhancement Often times, you copy commands from a website that has placeholders in it, which you are supposed to replace. Currently, on almost all terminals, you either copy the entire thing, move the cursor to where the placeholder is there and overwrite it. Or if you are like me, you copy it into Notepad, replace the placeholder with your parameter and then paste it into the terminal. Both are not very convenient. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Not exactly sure how the syntax should look to distinguish placeholders from actual text, but Windows Terminal could decide one. When a string with placeholders is copied, Windows Terminal should allow you to press Tab and to simply overwrite each placeholder with a parameter you want. The way Visual Studio does small code snippets could be an inspiration.
claunia added the Issue-FeatureProduct-TerminalArea-ExtensibilityArea-Chat labels 2026-01-31 06:49:11 +00:00
Author
Owner

@sylveon commented on GitHub (Apr 4, 2023):

How would terminal detect a placeholder? There is no real standard for them, everybody does it differently.

@sylveon commented on GitHub (Apr 4, 2023): How would terminal detect a placeholder? There is no real standard for them, everybody does it differently.
Author
Owner

@zadjii-msft commented on GitHub (Apr 4, 2023):

That would basically be my question. I've seen everything -<placeholder>, {placeholder}, {{placeholder}}, heck, even just placeholder.

Sure, there could be a network effect that might result from us starting to accept one format, that wouldn't replace all the existing documentation that already exists...

Though, I wonder if there isn't some way I could plug this into #12927, more or less. Instead of sendInput with promptable sections - paste with promptable sections. I dunno, something to noodle on.

@zadjii-msft commented on GitHub (Apr 4, 2023): That would basically be my question. I've seen everything -`<placeholder>`, `{placeholder}`, `{{placeholder}}`, heck, even just `placeholder`. Sure, there _could_ be a network effect that might result from us starting to accept one format, that wouldn't replace all the existing documentation that already exists... Though, I wonder if there isn't some way I could plug this into #12927, more or less. Instead of `sendInput` with promptable sections - `paste` with promptable sections. I dunno, something to noodle on.
Author
Owner

@sylveon commented on GitHub (Apr 4, 2023):

I personally like to use $PLACEHOLDER or %PLACEHOLDER% depending on the target audience :P

@sylveon commented on GitHub (Apr 4, 2023): I personally like to use $PLACEHOLDER or %PLACEHOLDER% depending on the target audience :P
Author
Owner

@asklar commented on GitHub (Apr 10, 2023):

this feels like either a CMD or a pwsh feature request, IOW the text mode shell, not terminal the host app.

@asklar commented on GitHub (Apr 10, 2023): this feels like either a CMD or a pwsh feature request, IOW the text mode shell, not terminal the host app.
Author
Owner

@zadjii-msft commented on GitHub (Apr 17, 2023):

Okay so we had some discussion about this. I think overall we agreed, yea - this is probably impossible or something that the shell should do.

But then we thought that this actually might be a place where LLMs might be valuable. This is something that you might actually be able to ask a LLM what "placeholder" text is in a string and let us prompt through it. I'm usually pretty reluctant to say "yea this is a good application for AI", but this genuinely seems like a problem that couldn't be solved without it.

That being said, it's not something we're likely to implement any time soon. I'm gonna leave this open as a possible extension idea.

@zadjii-msft commented on GitHub (Apr 17, 2023): Okay so we had some discussion about this. I think overall we agreed, yea - this is probably impossible or something that the shell should do. But then we thought that this actually _might_ be a place where LLMs might be valuable. This is something that you _might_ actually be able to ask a LLM what "placeholder" text is in a string and let us prompt through it. I'm usually pretty reluctant to say "yea this is a good application for AI", but this genuinely seems like a problem that couldn't be solved without it. That being said, it's not something we're likely to implement _any time soon_. I'm gonna leave this open as a possible extension idea.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19628