Closed zhefox closed 1 month ago
I don't understand the description.
Can you share more information, and a specific example?
Also, what terminal are you using? Are you sure this is a Clink issue, and not an issue with the terminal being used?
okay,here are more information for this question,
such as
if i copy "gflags.exe /p /enable "C:\Users\ben\Desktop\olds\scard.exe" /full" , It wraps because of the window width limit but if i copy in cmd with clink, It will be copied as a string with carriage return, as shown below gflags.exe /p /enable "C:\Users\ben\Desk top\olds\scard.exe" /full
In fact, it turned out to be a complete line of commands that could be executed
Itself if you copy-paste in the original cmd then it would be normal, so I think it's a problem with clink
You're using Windows Terminal, so unless you've deleted its CTRL-V binding, then Windows Terminal is handling the paste, not Clink.
Or have you deleted the default Windows Terminal key binding for CTRL-V to give Clink a chance to paste? If so, then what is clink.paste_crlf set to? Maybe you want ampersand
?
I'm still not sure what's being described, though.
What are the specific steps for copying, and what are the specific steps for pasting? There are several different ways to do each, and the specific ways being used are important in order to be able to troubleshoot.
Is it an issue with how Copy is working? Exactly how are you copying the text? There are many different ways to copy text, and in order to troubleshoot, it's important to know exactly which way of copying is used.
Is it an issue with how Paste is working? Does pasting into Notepad work how you want? There are several ways to paste -- Windows Terminal, or conhost, or Clink could be doing the paste. It depends on specifically how you've configured the terminal and Clink. But by default, Paste is done by Windows Terminal, not by Clink.
I've removed the ctrl+v of the terminal binding, but it still doesn't seem quite right
If I just use ctrl+c to copy the command line of the history that was successfully executed above and paste it, you can see that it wraps
I think I seem to have found a solution
You're right, you need to unbind the ctrl-v binding that comes with the terminal, and then turn off some settings
Oh no, it seems like you just need to turn off the function of the rectangle selected above in the terminal settings, the others are not needed, it doesn't seem to be a problem with clink, I'm sorry
There still seems to be some issues, if I use it on win10's cmd and don't have this option, he still seems to have this This doesn't seem to be a paste-in-question issue, it's the time ctrl+c is copied to the clipboard, and the line break is already there
Clink settings are set with clink set
, not with set
.
Ah, it's okay, it's still a problem with the terminal itself
Right -- the difference was not Clink, the difference was Windows Terminal versus the legacy conhost terminal.
When copying and pasting multiple command lines, line breaks cannot be automatically removed, resulting in only line by line when copying and pasting command lines in the terminal