wsl-terminal icon indicating copy to clipboard operation
wsl-terminal copied to clipboard

Pasting also executes command

Open safield opened this issue 4 years ago • 3 comments

I am trying to copy a path in a command I am running.

When I paste the path, the terminal also "hits enter" because the half types command tries to run.

The desired behavior would be that pasting does not also hit enter.

safield avatar May 28 '20 16:05 safield

Hi @safield, are you sure that what you have in your clipboard is not containing the \n character? because if it does it looks like a normal behavior to me. nevertheless I will look into mintty issues to see if someone reported something similar because wsl-terminal does not change the behavior of mintty. It just launches it.

mskyaxl avatar Jun 01 '20 17:06 mskyaxl

I believe a sane behaviour would be to sanitize input and remove \n at the end of a line

CharlesB2 avatar Jul 10 '20 07:07 CharlesB2

As mentioned above, wsl-terminal just launches mintty. In my opinion it should not remove the \n at the end because sometimes you really want this behavior but of course, you can create an issue on mintty repo.

mskyaxl avatar Jul 10 '20 07:07 mskyaxl