如何在启动时删除终端中的 "empty space"?

How can I remove the "empty space" in the terminal at launch?

我将 iterm2 与 oh-my-zsh (macOS) 一起使用,我想在第一行(现在是第 5 行)开始 "terminal code"。你能告诉我,我该怎么做吗?

这是我的 ~/.zshrc:

export ZSH=/Users/ivbutsykin/.oh-my-zsh
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true

plugins=(
 zsh-autosuggestions
)

source $ZSH/oh-my-zsh.sh
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

local user_symbol="$"
if [[ $(print -P "%#") =~ "#" ]]; then
  user_symbol = "#"
fi

POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%{%B%F{black}%K{yellow}%} $user_symbol%{%b%f%k%F{yellow}%} %{%f%}"
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='red'
echo -e "3]6;1;bg;red;brightness;18\a"
echo -e "3]6;1;bg;green;brightness;26\a"
echo -e "3]6;1;bg;blue;brightness;33\a"

您可以通过将 echo -e 替换为 echo -ne 来删除 3 个空行。要摆脱剩余的空行,您需要升级到 powerlevel10k。