From 6aebfd6aedde3911a0101e5f42ee033c4415e12f Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Mon, 7 Nov 2022 15:14:19 -0500 Subject: [PATCH] fix: powershell prompt Properly escape powershell/pwsh prompts Fixes: b0c663c9bc80 ("fix(pwsh): add powershell shell") --- shell.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell.go b/shell.go index e096e56c..4acaecf6 100644 --- a/shell.go +++ b/shell.go @@ -31,11 +31,11 @@ var Shells = map[string]Shell{ Command: `clear; fish --login --private -C 'function fish_greeting; end' -C '%s'`, }, powershell: { - Prompt: "Function prompt {Write-Host \"> \" -ForegroundColor Blue -NoNewLine; return \"`0\" }", + Prompt: "Function prompt {Write-Host \\\"> \\\" -ForegroundColor Blue -NoNewLine; return \\\"`0\\\" }", Command: ` clear; powershell -NoLogo -NoExit -Command 'Set-PSReadLineOption -HistorySaveStyle SaveNothing; %s'`, }, pwsh: { - Prompt: "Function prompt {Write-Host \"> \" -ForegroundColor Blue -NoNewLine; return \"`0\" }", + Prompt: "Function prompt {Write-Host \\\"> \\\" -ForegroundColor Blue -NoNewLine; return \\\"`0\\\" }", Command: ` clear; pwsh -Login -NoLogo -NoExit -Command 'Set-PSReadLineOption -HistorySaveStyle SaveNothing; %s'`, }, cmdexe: {