Skip to content

Commit

Permalink
fix: powershell prompt
Browse files Browse the repository at this point in the history
Properly escape powershell/pwsh prompts

Fixes: b0c663c ("fix(pwsh): add powershell shell")
  • Loading branch information
Ayman Bagabas authored and maaslalani committed Nov 7, 2022
1 parent addd18a commit 6aebfd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 6aebfd6

Please sign in to comment.