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

Pasted text evaluated via shell #1549

Open
Yaraslaut opened this issue Jun 27, 2024 · 1 comment · May be fixed by #1556
Open

Pasted text evaluated via shell #1549

Yaraslaut opened this issue Jun 27, 2024 · 1 comment · May be fixed by #1556
Labels
enhancement New feature or request feature-request User requested features

Comments

@Yaraslaut
Copy link
Member

Yaraslaut commented Jun 27, 2024

Abstract

When pasting text sometimes you want it to be evaluated via shell immediately, for example you cat readme file and want to run something that you select there. To do this now you need to paste selection and then press enter

Specification

Add argument for PasteSelection action, named execute so you can configure whether to run selected command
then key mapping entry can look like

    - { mods: [], mouse: Middle,  action: PasteSelection, mode: 'Insert', execute: 'true' }
@Yaraslaut Yaraslaut added enhancement New feature or request feature-request User requested features labels Jun 27, 2024
@christianparpart
Copy link
Member

At first I wanted to propose to extend SendChars action isntead, by allowing it to also send the clipboard (in a variable substitution format like syntax) plus a final linefeed like \n). But I think SendChars should not issue bracketed paste (as it's not doing right now, but should then, if clipboard is involved).

Maybe the solution would. be to rename your suggestion a bit. execute sounds misleading. All it would do is to append a linefeed. 🤔 (thinking out loud here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request User requested features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants