mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
parent
4572a6a8b9
commit
eabe6b3a7a
|
@ -266,6 +266,10 @@ func (a *Ansi) ClearAfter() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Ansi) Title(title string) string {
|
func (a *Ansi) Title(title string) string {
|
||||||
|
// we have to do this to prevent bash from misidentifying escape sequences
|
||||||
|
if a.shell == shell.BASH {
|
||||||
|
title = strings.ReplaceAll(title, `\`, `\\`)
|
||||||
|
}
|
||||||
return fmt.Sprintf(a.title, title)
|
return fmt.Sprintf(a.title, title)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue