Weird formatting on Bash on Ubuntu running in Windows using WSL when VirtualTerminalLevel is 1
gboor opened this issue · 0 comments
This is quite a weird one that I ran into a while ago when using Helm. The original ticket can be found here;
When using Bash on Ubuntu in Windows using WSL, apparently the terminal is still rendered using underlying Windows components. If the registry setting HKCU\Console\VirtualTerminalLevel is set to 1, the spacing of the tables get messed up.
HKCU\Console\VirtualTerminalLevel is normally not set, or set to 0. It needs to be set to 1 in order to enable ANSI color sequences in Windows CLI, which is why I had it set. Changing the setting back to 0 fixed the spacing issue.
I think this means that the tabling sends certain control characters that mess up the spacing somehow.
Note that kubectl output is just fine, even with this setting set. I understood from the Helm team (see original ticket) that they use some custom formatter.
I realize this is a very obscure issue, but it should be easy enough to reproduce on Windows 10 with WSL and Ubuntu. Just set the registry key, open a new bash window and try some tabled output.