How to remove new line from Terminal on launch

itermterminalzsh

When I launch terminal, it always puts a new line at the beginning first. I am using zsh and did install ohmyzsh, but I can't seem to find anything that would cause this behaviour. Please see attached screenshot. Using powerlevel10k theme.

I checked .bashrc, .zshrc, and every other profile I can think of but can't figure it out.
enter image description here

New tab and pressed return
new tab

UPDATE 2: .zshrc BAD CONTENT IDENTIFIED

# Colorise the top Tabs of Iterm2 with the same color as background
# Just change the 18/26/33 wich are the rgb values
echo -e "\033]6;1;bg;red;brightness;18\a"
echo -e "\033]6;1;bg;green;brightness;26\a"
echo -e "\033]6;1;bg;blue;brightness;33\a"

I don't know why these echo commands are causing that behavior, but when I comment out each one, the "new line" is less and less" until I have commented out all three. I got the commands from this medium.com post but it's only supposed to change the tab color. I have removed them now, but tabs are blah. Better than the line spacing.

Best Answer

Comment out or remove the following three lines from ~/.zshrc

#echo -e "\033]6;1;bg;red;brightness;18\a"
#echo -e "\033]6;1;bg;green;brightness;26\a"
#echo -e "\033]6;1;bg;blue;brightness;33\a"

Each echo actually creates a new line (on BigSur 11.2.3) and together they create 3 new lines on every new window/tab.