mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
feat(zsh): remove rprompt space natively
This commit is contained in:
parent
950c608939
commit
391ceaf5f0
|
@ -222,14 +222,6 @@ func (e *Engine) renderBlock(block *Block, cancelNewline bool) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// in ZSH, RPROMPT is printed with a trailing space
|
|
||||||
// to ensure alignment, we need to print a space here
|
|
||||||
// see https://github.com/JanDeDobbeleer/oh-my-posh/issues/4327
|
|
||||||
if e.Env.Shell() == shell.ZSH {
|
|
||||||
text += " "
|
|
||||||
length++
|
|
||||||
}
|
|
||||||
|
|
||||||
space, OK := e.canWriteRightBlock(false)
|
space, OK := e.canWriteRightBlock(false)
|
||||||
// we can't print the right block as there's not enough room available
|
// we can't print the right block as there's not enough room available
|
||||||
if !OK {
|
if !OK {
|
||||||
|
|
|
@ -4,6 +4,7 @@ export POSH_PID=$$
|
||||||
export POWERLINE_COMMAND="oh-my-posh"
|
export POWERLINE_COMMAND="oh-my-posh"
|
||||||
export CONDA_PROMPT_MODIFIER=false
|
export CONDA_PROMPT_MODIFIER=false
|
||||||
export POSH_PROMPT_COUNT=0
|
export POSH_PROMPT_COUNT=0
|
||||||
|
export ZLE_RPROMPT_INDENT=0
|
||||||
|
|
||||||
# set secondary prompt
|
# set secondary prompt
|
||||||
PS2="$(::OMP:: print secondary --config="$POSH_THEME" --shell=zsh)"
|
PS2="$(::OMP:: print secondary --config="$POSH_THEME" --shell=zsh)"
|
||||||
|
|
Loading…
Reference in a new issue