Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bracketed paste for "Run Selected Text In Active Terminal" #159153

Closed
tstenner opened this issue Aug 25, 2022 · 2 comments · Fixed by #169789
Closed

Use bracketed paste for "Run Selected Text In Active Terminal" #159153

tstenner opened this issue Aug 25, 2022 · 2 comments · Fixed by #169789
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@tstenner
Copy link

The "Run Selected Text In Active Terminal" function (especially with a key binding) is invaluable for quickly testing snippets in bash scripts. Unfortunately, the input is interpreted by the interactive terminal when tabs are used for indentation:

STR="Foo
		Bar"  # two tabs

Running this snippet leaves the terminal like this:

STR="Foo
> 
Display all 2389 possibilities? (y or n)

For most terminals, setting set enable-bracketed-paste on in the .inputrc or running bind 'set enable-bracketed-paste on' skips the terminal handling for pasted text (see bracketed paste).

The integrated terminal should use bracketed paste (and set this option) by default.

Currently, it can be circumvented by running bind 'set disable-completion on', but then I would have to enable it manually again before using the terminal interactively.

@tstenner
Copy link
Author

Addendum: manually pasting the block with Strg+Shift+V works as intended

@meganrogge meganrogge added the terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. label Dec 5, 2022
@Tyriar
Copy link
Member

Tyriar commented Dec 5, 2022

If we do this we need to be careful of edge cases like #153592 (comment)

@Tyriar Tyriar added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Dec 5, 2022
@Tyriar Tyriar modified the milestones: Backlog, January 2023 Dec 5, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Dec 22, 2022
@meganrogge meganrogge added the verification-needed Verification of issue is requested label Jan 20, 2023
@eleanorjboyd eleanorjboyd added the verification-steps-needed Steps to verify are needed for verification label Jan 25, 2023
@rzhao271 rzhao271 added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Jan 26, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders terminal-input Relating to typing in the terminal not doing the right thing, IMEs not working, etc. verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants