From dfae989782af64983efdb1f687b45e614ba92f1f Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sat, 27 Aug 2022 21:49:03 +0200 Subject: [PATCH] fix(pwsh): escape backticks correctly --- src/engine/segment.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/segment.go b/src/engine/segment.go index a7b514d5..b513cf7e 100644 --- a/src/engine/segment.go +++ b/src/engine/segment.go @@ -400,6 +400,7 @@ func (segment *Segment) SetText() { segment.text = strings.ReplaceAll(segment.text, `\`, `\\`) case shell.ZSH: segment.text = strings.ReplaceAll(segment.text, `%`, `%%`) + case shell.PWSH, shell.PWSH5: + segment.text = strings.ReplaceAll(segment.text, "`", "``") } - segment.text = strings.ReplaceAll(segment.text, "`", "'") }