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

Copy paste #6

Closed
mattddowney opened this issue May 27, 2016 · 7 comments
Closed

Copy paste #6

mattddowney opened this issue May 27, 2016 · 7 comments
Assignees
Labels

Comments

@mattddowney
Copy link

Copy pasting creates undesired behavior.

Pasting the following into my terminal:
echo -e "\e[1;31mSome red message\e[0m"

Will result in:
echo -e "\e[1;31mSome red message\e[0m""]]"

At first I thought it might be my terminal, but the behavior exists whether I use terminator, xterm, or the default terminal for Xubuntu 16.04.

@laughedelic laughedelic self-assigned this May 27, 2016
@laughedelic
Copy link
Owner

laughedelic commented May 27, 2016

@mattddowney I see this problem on fish 2.3.0. Which version of fish do you use?

@mattddowney
Copy link
Author

2.3.0.

Digging into this, it looks like what might need to happen is to compare the contents of the clipboard with the input. IE:

xsel --clipboard

@laughedelic
Copy link
Owner

Hi @mattddowney. Have you come up with any solution/workaround?

@mattddowney
Copy link
Author

I looked into it, but wasn't able to get anything working that didn't cause more bugs

@laughedelic
Copy link
Owner

Hi @mattddowney! I think I have good news regarding this issue.

I recently updated to fish 2.6 and noticed that I can't reproduce this bug, because they implemented bracketed (a.k.a safe) paste in v2.6 🎉 From the v2.6 release notes:

Under terminals which support it, bracketed paste is enabled, escaping problematic characters for security and convience (#3871). Inside single quotes ('), single quotes and backslashes in pasted text are escaped (#967). The fish_clipboard_paste function (bound to C-v by default) is still the recommended pasting method where possible as it includes this functionality and more.

I just tested on clean environment different versions and observed that the problem persists up to fish 2.5, but disappears in 2.6. So I'm going to close it. Anyway, if you can upgrade to fish 2.6 and confirm that the issue is not relevant anymore, please write here a comment 😉

@mattddowney
Copy link
Author

Updated to 2.6.0

Issue is gone in Terminator and XTerm, however, the issue persists in VSCode's integrated terminal (v1.14.2). Pretty sure this is something upstream though, because C-v works fine, but right click > paste does not.

But it seems to mostly work, so that's awesome. Thanks for keeping up with this!

@laughedelic
Copy link
Owner

Cool! Thanks for the info. I'm glad that it's (mostly) solved for you. Can't say anything about VSCode though, but as you say, it should be something upstream..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants