sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.22k stars 978 forks source link

How can I do to remove extra white line between two command lines when I set single-line prompts. #589

Closed Skyearn closed 3 years ago

Skyearn commented 3 years ago

General information

System report (output of prompt_pure_system_report):

I have:

Just a display problem.

Problem description

I set ~/.zshrc as https://github.com/sindresorhus/pure/issues/228 for single-line prompts, then this caused a new problem, there are extra white line between two command lines. and I have no way to solve this problem.

It's mine:

I want change it like this:

Reproduction steps

1.Add prompt pure prompt_newline='%666v' PROMPT=" $PROMPT" to ~/.zshrc 2.source ~/.zshrc 3.

My .zshrc:

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles export PATH="/usr/local/opt/icu4c/bin:$PATH" export PATH="/usr/local/opt/icu4c/sbin:$PATH" export LDFLAGS="-L/usr/local/opt/icu4c/lib" export CPPFLAGS="-I/usr/local/opt/icu4c/include"

eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"

source "$HOME/.zinit/bin/zinit.zsh" autoload -Uz _zinit (( ${+_comps} )) && _comps[zinit]=_zinit

autoload -U promptinit; promptinit prompt pure prompt_newline='%666v' PROMPT=" $PROMPT"

zinit ice lucid wait'!0' zinit light zdharma/fast-syntax-highlighting

zinit ice lucid wait'!0' zinit light zsh-users/zsh-autosuggestions

zinit light-mode for \ zinit-zsh/z-a-rust \ zinit-zsh/z-a-as-monitor \ zinit-zsh/z-a-patch-dl \ zinit-zsh/z-a-bin-gem-node

bindkey "\e[1~" beginning-of-line bindkey "\e[4~" end-of-line bindkey "\e[5~" beginning-of-history bindkey "\e[6~" end-of-history

bindkey "\e[8~" end-of-line bindkey "\e[7~" beginning-of-line bindkey "\eOH" beginning-of-line bindkey "\eOF" end-of-line bindkey "\e[H" beginning-of-line bindkey "\e[F" end-of-line bindkey '^i' expand-or-complete-prefix

bindkey -s "^[Op" "0" bindkey -s "^[On" "." bindkey -s "^[OM" "^M" bindkey -s "^[Oq" "1" bindkey -s "^[Or" "2" bindkey -s "^[Os" "3" bindkey -s "^[Ot" "4" bindkey -s "^[Ou" "5" bindkey -s "^[Ov" "6" bindkey -s "^[Ow" "7" bindkey -s "^[Ox" "8" bindkey -s "^[Oy" "9" bindkey -s "^[Ol" "+" bindkey -s "^[Om" "-" bindkey -s "^[Oj" "*" bindkey -s "^[Oo" "/"