mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
f19460a0c5
commit
8cf85a370d
|
@ -219,11 +219,8 @@ func (e *engine) renderTooltip(tip string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *engine) renderTransientPrompt(command string) string {
|
func (e *engine) renderTransientPrompt(command string) string {
|
||||||
newlines := strings.Count(command, ";")
|
newlines := strings.Count(command, "\n")
|
||||||
if strings.HasSuffix(command, ";") {
|
command = strings.Replace(command, "\n", e.ansi.newLine(), newlines)
|
||||||
newlines--
|
|
||||||
}
|
|
||||||
command = strings.Replace(command, ";", fmt.Sprintf(";%s", e.ansi.newLine()), newlines)
|
|
||||||
promptTemplate := e.config.TransientPrompt.Template
|
promptTemplate := e.config.TransientPrompt.Template
|
||||||
if len(promptTemplate) == 0 {
|
if len(promptTemplate) == 0 {
|
||||||
promptTemplate = "{{ .Shell }}> <#f7dc66>{{ .Command }}</>"
|
promptTemplate = "{{ .Shell }}> <#f7dc66>{{ .Command }}</>"
|
||||||
|
|
Loading…
Reference in a new issue