-
Notifications
You must be signed in to change notification settings - Fork 299
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
Long single-line commands gets mangled when pasted in / sent over TTY #4100
Comments
Is there any way to get this issue triaged? I can provide more info if needed. |
Hi @StevenBucher98! Thanks for taking a look. So things I have found that affect reproducability:
So my best guess is that it has something to do with pasting long commands into PSReadline, especially when the command triggers a prediction source suggestion. Fwiw, if the example command has pasted properly, this is what the output should look like:
It should be an error message for running Sometimes the error I am seeing still results in a "valid" command, but the output is not correct. here is an example output of that case, where the 23rd line of characters is missing
|
oh, also worth pointing out that I am seeing this in iTerm2. |
PSReadline version is 2.3.5. Also, I'm realizing a weird quirk of this: I can only replicate this bug if it is a shell within a shell. So if I set the shell to I'm also noticing that jiggling the window size seems to replicate it. It seems to repro pretty quickly at a Width of 148 and a Height of 46. |
Prerequisites
Exception report
N/A
Screenshot
Screen.Recording.2024-08-07.at.4.07.09.PM.mov
Environment data
Steps to reproduce
On MacOS
Add the following command to your clipboard:
Paste the following command into an iTerm running
pwsh
Expected behavior
The command displayed in the terminal will be the same as what was originally copied.
Actual behavior
Sometimes, the command is mangled, with parts of the command transplanted to other parts.
Example of a mangled command:
(Notice at a certain point the substring
HIJKLMNOP
is replaced withHIJ'!"#OP
The text was updated successfully, but these errors were encountered: