2

Printing anything with a tab in WSL prints a series of spaces instead of a tab. When I want to copy and paste these lines, obviously spaces are copied, so I lose a lot of formatting.

I've tried using CMD.exe, PowerShell, and MobaXTerm, but in every case I can't seem to print a tab.

echo -e "Col1\tCol2\tCol3 and spaces"

I expect that tab characters should be output and copyable, but the tabs are converted to spaces. Gnome-Terminal in Ubuntu handles this just fine, but every option in Windows 10 / WSL seems to fail.

donutbrew
  • 81
  • 1
  • 6
  • I don't think windows terminals support tabs like that... – ifconfig Aug 30 '19 at 04:19
  • See: https://superuser.com/a/240508/342885 – ifconfig Aug 30 '19 at 04:27
  • 1
    The linked comment shows how to print out a tab, but the tab is represented by spaces on the actual output, so if you copy and paste it out of the terminal window, the tab is, of course just some spaces. It's the same problem. – donutbrew Aug 30 '19 at 13:11
  • Coming back to Windows from years only on Linux, it seems inconceivable that there are no terminal applications that handle this sensibly. – donutbrew Aug 30 '19 at 13:12
  • Yes, that's whet I've been saying... I'm not sure this is possible in Windows. – ifconfig Aug 30 '19 at 14:31
  • 1
    Ah, I didn't notice you posted both comments. My bad. Gnome Terminal under WSL still deals with tabs the same way as under Ubuntu, so it is possible, just not done properly in the Windows applications I have access to. – donutbrew Aug 30 '19 at 16:35

0 Answers0