microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.41k stars 8.3k forks source link

Strip or replace tabs when pasting #6134

Open mdalacu opened 4 years ago

mdalacu commented 4 years ago

Environment

Microsoft Windows [Version 10.0.18363.836] Windows Terminal Version: 1.0.1401.0

Any other software? Google Sheets or any other software that delimits columns in clipboard by TAB character



# Steps to reproduce
Have multiple commands written in google sheets one per row but with parts of it in different cells

# Expected behavior

When you paste in normal cmd window the TAB caracter gets ignored. 

# Actual behavior

When you paste commands containing TAB caracter autocompletition triggers and the command gets corrupted

<img width="810" alt="Annotation 2020-05-22 160454" src="https://user-images.githubusercontent.com/14089766/82670799-7bfc5680-9c46-11ea-84aa-e3eec4e22286.png">
mdalacu commented 4 years ago
Annotation 2020-05-22 160454
DHowett commented 4 years ago

So, this is one of those weird problems. This is because the data coming out of Google Sheets has raw tab characters in it. (I know you know that, but I was doing exposition!) A compliant terminal (the traditional console host is not a compliant terminal) must pass that tab character through as-is.

This is, of course, resulting in tab completion as though you had pressed Tab yourself.

Maybe we should have a setting configuring what happens to Tab when you paste it in.

zadjii-msft commented 1 year ago

Huh #9380