mskyaxl / wsl-terminal

Terminal emulator for Windows Subsystem for Linux (WSL)
MIT License
3.12k stars 160 forks source link

Pasting also executes command #187

Open safield opened 4 years ago

safield commented 4 years ago

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.

mskyaxl commented 4 years ago

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.

CharlesB2 commented 4 years ago

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

mskyaxl commented 4 years ago

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.