Skip to content

Commit 391ceaf

Browse files
feat(zsh): remove rprompt space natively
1 parent 950c608 commit 391ceaf

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/engine/engine.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,6 @@ func (e *Engine) renderBlock(block *Block, cancelNewline bool) bool {
222222
return false
223223
}
224224

225-
// in ZSH, RPROMPT is printed with a trailing space
226-
// to ensure alignment, we need to print a space here
227-
// see https://github.com/JanDeDobbeleer/oh-my-posh/issues/4327
228-
if e.Env.Shell() == shell.ZSH {
229-
text += " "
230-
length++
231-
}
232-
233225
space, OK := e.canWriteRightBlock(false)
234226
// we can't print the right block as there's not enough room available
235227
if !OK {

src/shell/scripts/omp.zsh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export POSH_PID=$$
44
export POWERLINE_COMMAND="oh-my-posh"
55
export CONDA_PROMPT_MODIFIER=false
66
export POSH_PROMPT_COUNT=0
7+
export ZLE_RPROMPT_INDENT=0
78

89
# set secondary prompt
910
PS2="$(::OMP:: print secondary --config="$POSH_THEME" --shell=zsh)"

0 commit comments

Comments
 (0)