mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #157505 from microsoft/tyriar/157417
Avoid null coalescing operator for pwsh 6 support
This commit is contained in:
@@ -36,7 +36,11 @@ function Global:Prompt() {
|
||||
# Sanitize the command line to ensure it can get transferred to the terminal and can be parsed
|
||||
# correctly. This isn't entirely safe but good for most cases, it's important for the Pt parameter
|
||||
# to only be composed of _printable_ characters as per the spec.
|
||||
$CommandLine = $LastHistoryEntry.CommandLine ?? ""
|
||||
if ($LastHistoryEntry.CommandLine) {
|
||||
$CommandLine = $LastHistoryEntry.CommandLine
|
||||
} else {
|
||||
$CommandLine = ""
|
||||
}
|
||||
$Result += $CommandLine.Replace("`n", "<LF>").Replace(";", "<CL>")
|
||||
$Result += "`a"
|
||||
# Command finished exit code
|
||||
|
||||
Reference in New Issue
Block a user