-
-
Notifications
You must be signed in to change notification settings - Fork 972
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
Optional confirmations for multi-line paste and very long paste #4873
Comments
Not something I care about personally. I have never seen an actual |
Thanks for adding this new feature. If you don't have a need for this, do you have a suggestion for a more generic name? |
On Thu, Mar 24, 2022 at 07:39:40AM -0700, page-down wrote:
Thanks for adding this new feature.
This looks like it could be applied to drag and drop files (URLs with or without newline).
#4734
If you don't have a need for this, do you have a suggestion for a more generic name?
I'm afraid I still dont see the need for this. Pasting happens from an
"invisible" system clipboard whose contents you dont typically know with
certainty. So there is some chance you could accidentally paste
something bad. Drag and drop you explicitly select what you are
dropping.
|
Seems like the feature doesn't work now.
The quoting url thing works. But I dont get any confirmation dialog when pasting multiline text. |
Newlines are confirmed only if bracketed paste is not enabled by the |
I don't know exactly what bracketed paste is. But let me ask this, my issue is that sometimes when copy pasting commands into a terminal, there is an extra new line which causes cmds to be executed before i have edited it. I am not concerned about security issues but just convenience. So does kitty allow this? |
Bracketed paste does not execute the command if you paste multiple lines. |
Turn on bracketed paste in your shell, this has nothing to do with |
I am using zsh, I cannot find a proper resource documenting this bracketed paste and how to use. Most of the discussions are surrounding bash and readline . |
zsh uses bracketed paste by default in most configurations, just look up "zsh bracketed paste" or something. This has nothing to do with the terminal emulator. |
Is your feature request related to a problem? Please describe.
Pasting into a terminal can cause security issues when the clipboard content is multiline, and performance issues when the content is too long.
Describe the solution you'd like
As many other terminals do, it would be great to have an (optional) confirmation when pasting multiline or long content, preferably with a preview. Here is an example of how it can be implemented:
Of course it wouldn't have to be an external dialog box, this is just an example.
Describe alternatives you've considered
The bracketed paste feature can protect a shell, but this is dependent on the shell supporting it. This is a non-issue for your local shell, but it becomes a problem when SSHing into servers with bracketed paste not enabled. For example, bash in a default Ubuntu Server install does not have bracketed paste enabled, and the busybox sh binary does not support the feature at all. Doing the paste-checking in the terminal emulator instead applies the protection everywhere.
Additional context
This should be an optional configurable feature, as some people find bracketed paste sufficient.
The text was updated successfully, but these errors were encountered: