mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
parent
4888514d1c
commit
bc9f884e9c
|
@ -356,7 +356,8 @@ func (segment *Segment) SetText() {
|
|||
// see https://github.com/JanDeDobbeleer/oh-my-posh/discussions/2255
|
||||
// this can't happen where we do regular text replacement in ansi.go
|
||||
// as that would also replace valid \[\] sequences and break the prompt
|
||||
if segment.env.Shell() == shell.BASH {
|
||||
// except for git bash on Windows
|
||||
if segment.env.Shell() == shell.BASH && segment.env.Platform() != environment.WindowsPlatform {
|
||||
segment.text = strings.ReplaceAll(segment.text, `\`, `\\`)
|
||||
}
|
||||
segment.Enabled = len(strings.ReplaceAll(segment.text, " ", "")) > 0
|
||||
|
|
Loading…
Reference in a new issue