fix(transient): do not run when no config

This commit is contained in:
Jan De Dobbeleer 2021-09-09 20:02:30 +02:00 committed by Jan De Dobbeleer
parent 13cb9a6a58
commit 78d0a42556

View file

@ -219,6 +219,9 @@ func (e *engine) renderTooltip(tip string) string {
} }
func (e *engine) renderTransientPrompt() string { func (e *engine) renderTransientPrompt() string {
if e.config.TransientPrompt == nil {
return ""
}
promptTemplate := e.config.TransientPrompt.Template promptTemplate := e.config.TransientPrompt.Template
if len(promptTemplate) == 0 { if len(promptTemplate) == 0 {
promptTemplate = "{{ .Shell }}> " promptTemplate = "{{ .Shell }}> "