Terminal output messed up on Big Sur

big surterminal

my terminal is showing output in weird way and I don't know what it is called, so couldn't find similar question on this site, so pardon me for asking again.

This is the output on my terminal on MacOS 11.1 Big Sur:
enter image description here

As you can see the words are wrapped at first character.
I tried changing following things to fix: font, Oh-my-zsh theme. None worked.

My configuration for the terminal are:

  • Use Zsh – the default theme. .zshrc contents here
  • Use oh-my-zsh for the prompt and theme is powerlevel10k. Used robbyrussell theme for screen shot.
  • Font is Fira Mono, size 18.

Please tell me if I am missing something here to provide more details of my setup. Thank you.

Best Answer

I actually found out that the cause of the issue was this line tabs 4 in .zshrc. This worked on very well for me on Linux using Konsole terminal. I had copied my code configs from Linux after switching.

Update:

I found out that MacOS terminal uses negative values to the tabs command instead of positive. So for example, for width of 4 spaces, it should tabs -4. On Linux, it should be tabs 4 to achieve the same.