Terminal: Copy & Paste from any shell into MS Teams chat results in red background

Created on 9 Jun 2020  ·  7Comments  ·  Source: microsoft/terminal

Environment

Microsoft Windows [Version 10.0.18363.836]

Any other software?
MS Teams. And it's unique to MS Teams AFAIK. But both Terminal and Teams behave like expected when interacting with other software.

Steps to reproduce

  • Open any shell in terminal _(tested with Ubuntu 18.04, PowerShell, cmd)_
  • Mark any text in the shell _(I'm using the mouse)_
  • Copy marked text to clipboard _(I've remapped Copy to CTRL+INS and Paste to SHIFT+INS, if that matters)_
  • Paste the clipboard contents in a Teams chat

Expected behavior

Copy & Paste from other plain text sources _(of which I think the Terminal is one, mat least when it comes to C&P)_ results in black text on white background _(using the light theme for Teams)_. I'd expect the same colors when pasting text from the Terminal.

C&P from PowerShell or cmd not launched thru Terminal results in the expected behavior.

Actual behavior

Text pasted from a Terminal shell results in MS Teams adding a red background:

  • Ubunbtu
    image
  • PowerShell
    image
  • CMD
    image

I don't know which application to blame, as both seem to show the expected results when interacting with other applications. It's these two interacting with each other.

Issue-Question Needs-Tag-Fix Resolution-Answered Resolution-External

Most helpful comment

the default setting

Good news! It is, for anyone who installed Terminal after version 1.0 came out. We didn’t stomp the defaults for everyone who was already using it, because moving peoples’ cheese is considered unkind ;)

All 7 comments

I'll say that Teams has by far the worst formatted paste of any app I've seen so far. I don't know why it seems to just pick a seemingly random color for the text background, and ignore everything else.

It works fine in Outlook and other office apps:
image

but Teams is just:
image


You can work around this usually by pressing ctrl+shift+v when pasting into Teams.


I'm gonna take this on me to follow up with the Teams team and figure out why this is so bad. I've filed feedback, and their bot gave me a link in my inbox to follow up with

And if you want to disable formatted copy forever, add "copyFormatting": false to your toplevel settings. :smile:

@zadjii-msft Thanks for picking this up and handing it over to the appropriate Teams ... pun intended, obviously.

Now that it isn't a Terminal isue, but got picked up, I'm unsure as to what to do with the issue? Close it, leave it open for you guys to follow up? I'd be fine by me, if you close it yourself, if no longer needed as an open issue.

@DHowett Thank you very much! Now that is helluva useful setting. If I had something to say, that'd be the default setting.

I'm gonna leave this open for now while to make sure I track down the right people. Thanks for the diligence though!

the default setting

Good news! It is, for anyone who installed Terminal after version 1.0 came out. We didn’t stomp the defaults for everyone who was already using it, because moving peoples’ cheese is considered unkind ;)

@DHowett

Good news! It is, for anyone who installed Terminal after version 1.0 came out.

What's this arcane sorcery? Mind-reading from afar ... 👍

Hey so a follow up from the Teams team - apparently this is going to be fixed in an upcoming Teams release, but I'm not sure when that release will land, and I'm pretty confident I couldn't communicate that timeline even if I did know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

warpdesign picture warpdesign  ·  3Comments

carlos-zamora picture carlos-zamora  ·  3Comments

Wid-Mimosa picture Wid-Mimosa  ·  3Comments

ghvanderweg picture ghvanderweg  ·  3Comments

wkbrd picture wkbrd  ·  3Comments