-
Notifications
You must be signed in to change notification settings - Fork 180
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
Bracketed paste on Windows? #594
Comments
|
Because Microsoft's release announcement said they added support... that's all I can bank on... I haven't actually found a switch to toggle it on/off or something... https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-7-release/ Seems it starts having it as at version 1.7. microsoft/terminal#10153 says DECSET 2004 is supported...
Then pasted text will be prefixed and postfixed by extra escape codes, I suppose... |
I am afraid I will not be able to fix this because I only have limited access (no admin rights, no access to windows store) to a Windows machine at work. |
Anything I can help? I run a Windows machine. Or maybe I open up a Windows VM on Azure for you? |
@schungx If you want, you can checkout https://github.com/gwenn/rustyline/tree/bracketed_paste and then check if you find Or maybe there is a way to install |
I don't think you can install anything on Windows without admin rights unless it is granted via some explicit policy... I can take some time to try it out and check out the logs... |
I can install many apps without admin rights (GVim, Visual Studio Code, Clion, rustc, cargo, MinGW, alacritty, wezterm, ...). |
Hhmmm.... that seem strange. In that case Windows Terminal shouldn't be blocked... You can install it via an installer instead of from the Microsoft Store and it may work... |
Tried it, and the example seems to work!!! No Log attached. |
Do I need to do any of that Can I just set Because it doesn't work in my app even when compiled with the local version, but it works just fine with If I take away |
If you don't have |
It seems related to this optim. |
As a matter of fact, after scanning through the code, I don't think escape codes are ever implemented for Windows. Things like color are implemented on Windows via a Highlight Validator, while they are directly implemented on Unix. So on Windows it is not bracketed paste, but using a validator to continue lines. I'll experiment some more and post here. It seems that Windows Terminal has never sent the bracketed paste escape codes to the app. Maybe there is a switch or option I need to turn on... One thing I find strange is that:
EDIT: The warning disappears once it receives a bracketed-paste-on escape sequence |
Taking cue from microsoft/terminal#12385 By setting However, |
PR gwenn#1 opened with an implementation that works for me! |
Understand that the implementation is not optimal (which duplicates many of the same escape-code processing for Unix). It is left in my fork for now: https://github.com/schungx/rustyline Whoever needs it can pull from my fork, or wait for official support to land here. I can't guarantee that everything works seamlessly, but at least it works for me... |
Microsoft Terminal now supports bracketed paste.
Can
enable_bracketed_paste
support be added to Windows targets as well? Right now, support is only for Unix environments.The text was updated successfully, but these errors were encountered: