Strip or replace tabs when pasting #8488

Open
opened 2026-01-31 01:30:47 +00:00 by claunia · 3 comments
Owner

Originally created by @mdalacu on GitHub (May 22, 2020).

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">
Originally created by @mdalacu on GitHub (May 22, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # 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">
claunia added the Help WantedIssue-TaskProduct-TerminalArea-TerminalControl labels 2026-01-31 01:30:48 +00:00
Author
Owner

@mdalacu commented on GitHub (May 22, 2020):

Annotation 2020-05-22 160454
@mdalacu commented on GitHub (May 22, 2020): <img width="810" alt="Annotation 2020-05-22 160454" src="https://user-images.githubusercontent.com/14089766/82670863-9afae880-9c46-11ea-8975-2aa3596bbf3a.png">
Author
Owner

@DHowett commented on GitHub (May 25, 2020):

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.

@DHowett commented on GitHub (May 25, 2020): 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 <kbd>Tab</kbd> yourself. Maybe we should have a setting configuring what happens to Tab when you paste it in.
Author
Owner

@zadjii-msft commented on GitHub (Apr 5, 2023):

Huh #9380

@zadjii-msft commented on GitHub (Apr 5, 2023): Huh #9380
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8488