Skip to content

Commit

Permalink
fix(bash): escape rprompt
Browse files Browse the repository at this point in the history
resolves #5221
  • Loading branch information
JanDeDobbeleer committed Jul 7, 2024
1 parent f7f3187 commit c27a281
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/prompt/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,7 @@ func (e *Engine) renderBlock(block *config.Block, cancelNewline bool) bool {
return false
}

// when in bash, for rprompt blocks we need to write plain
// and wrap in escaped mode or the prompt will not render correctly
if e.Env.Shell() == shell.BASH && block.Type == config.RPrompt {
block.InitPlain(e.Env, e.Config)
} else {
block.Init(e.Env)
}
block.Init(e.Env)

if !block.Enabled() {
return false
Expand Down

0 comments on commit c27a281

Please sign in to comment.